elm_scroller: focus_direction should not be called when scroller focusable and no...
authorJeonghyun Yun <jh0506.yun@samsung.com>
Fri, 11 Aug 2017 04:55:22 +0000 (13:55 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Fri, 11 Aug 2017 04:55:22 +0000 (13:55 +0900)
Summary:
when scroller can have focus and scroller's child can't have focus,
there is a problem that scroller is always selected to next focus object.
In this case, it should not enter into _elm_scroller_elm_widget_focus_direction()

Reviewers: woohyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5085

src/lib/elementary/elm_scroller.c

index d0593b5..417d84e 100644 (file)
@@ -487,8 +487,11 @@ _elm_scroller_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Scroller_Data *sd,
 }
 
 EOLIAN static Eina_Bool
-_elm_scroller_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Scroller_Data *_pd EINA_UNUSED)
+_elm_scroller_elm_widget_focus_direction_manager_is(Eo *obj, Elm_Scroller_Data *_pd EINA_UNUSED)
 {
+   if (!elm_widget_child_can_focus_get(obj))
+     return EINA_FALSE;
+
    return EINA_TRUE;
 }