fix(obj): in obj event use the current target instead of target
When the event is bubbling, use lv_event_get_current_target
to get the obj that needs to be processed
@@ -699,7 +699,7 @@ static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e)
LV_UNUSED(class_p);
lv_event_code_t code = lv_event_get_code(e);
- lv_obj_t * obj = lv_event_get_target(e);
+ lv_obj_t * obj = lv_event_get_current_target(e);
if(code == LV_EVENT_PRESSED) {
lv_obj_add_state(obj, LV_STATE_PRESSED);
}
