ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0141417d5ddd4537aa22a9dc844e14221e52dd8b
commit 0141417d5ddd4537aa22a9dc844e14221e52dd8b Author: Amitesh Singh <amitesh...@samsung.com> Date: Fri Jun 30 12:18:33 2017 +0900 genlist: move to next focusable/selectable item when looping this fixes a bug in genlist when scrolling is enabled and items at top and bottom are disabled. Focus behaviour is not normal in case up arrow is pressed when focus is at the top enabled item or down key is pressed when focus is at bottom enabled item. fixes T5576 --- src/lib/elementary/elm_genlist.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 712d6f0e08..762350c3ee 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -2956,7 +2956,7 @@ _key_action_move_dir(Evas_Object *obj, Elm_Focus_Direction dir, Eina_Bool multi) // handle item loop feature if (sd->item_loop_enable && !sd->item_looping_on) { - if (min > v) + if (min < v) { if (dir == ELM_FOCUS_UP) { @@ -2972,9 +2972,19 @@ _key_action_move_dir(Evas_Object *obj, Elm_Focus_Direction dir, Eina_Bool multi) else { if (dir == ELM_FOCUS_UP) - it = elm_genlist_last_item_get(obj); + { + it = elm_genlist_last_item_get(obj); + ELM_GENLIST_ITEM_DATA_GET(it, gen_it); + while (_is_no_select(gen_it) || elm_wdg_item_disabled_get(it)) + it = elm_genlist_item_prev_get(it); + } else if (dir == ELM_FOCUS_DOWN) - it = elm_genlist_first_item_get(obj); + { + it = elm_genlist_first_item_get(obj); + ELM_GENLIST_ITEM_DATA_GET(it, gen_it); + while (_is_no_select(gen_it) || elm_wdg_item_disabled_get(it)) + it = elm_genlist_item_next_get(it); + } if (it && focus_only) elm_object_item_focus_set(it, EINA_TRUE); --