mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-23 07:46:36 +08:00
fix(roller): fix bubbling events (#4542)
This commit is contained in:
@@ -334,7 +334,7 @@ static void lv_roller_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
||||
if(res != LV_RESULT_OK) return;
|
||||
|
||||
const 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);
|
||||
lv_roller_t * roller = (lv_roller_t *)obj;
|
||||
|
||||
if(code == LV_EVENT_GET_SELF_SIZE) {
|
||||
|
||||
@@ -161,6 +161,14 @@ void test_roller_keypad_events(void)
|
||||
TEST_ASSERT_EQUAL(expected_index, actual_index);
|
||||
}
|
||||
|
||||
void test_roller_with_overlay_and_bubble_events_enabled(void)
|
||||
{
|
||||
lv_obj_t * overlay = lv_obj_create(roller);
|
||||
lv_obj_add_flag(overlay, LV_OBJ_FLAG_EVENT_BUBBLE);
|
||||
|
||||
lv_obj_send_event(overlay, LV_EVENT_PRESSED, NULL);
|
||||
}
|
||||
|
||||
//void test_roller_infinite_mode_first_option_gets_selected_after_last_option(void)
|
||||
//{
|
||||
// char actual_str[OPTION_BUFFER_SZ] = {0x00};
|
||||
|
||||
Reference in New Issue
Block a user