scroller: fix to skip focus for unfocusable scroller 94/89994/2
authorWonki Kim <wonki_.kim@samsung.com>
Wed, 28 Sep 2016 04:19:30 +0000 (13:19 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 11 Oct 2016 11:46:51 +0000 (04:46 -0700)
this commit is merged from upstream(D4056)

Summary:
There is a issue about passing the focus to unfocusable scroller.
To prevent the issue, check the status of focusable object and child
object
before passing the focus.

Test Plan:
{F38439}

I changed the test file.
The problem occured as below.

1. click button
2. show popup
3. click cancel button in popup
4. lost the focus

Reviewers: Hermet, raster, cedric
Reviewed By: cedric
Subscribers: minkyu, sju27, cedric, jpeg

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

Change-Id: I66ebde6ed5f01ca8b54fe9cd556f4745dd89db8a
Signed-off-by: Wonki Kim <wonki_.kim@samsung.com>
src/lib/elm_scroller.c

index c5913f5..25fee94 100644 (file)
@@ -450,6 +450,10 @@ _elm_scroller_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Scroller_Data *sd,
           return ret;
      }
 
+   if (!(elm_widget_can_focus_get(obj)) &&
+       !(elm_widget_can_focus_get(cur)))
+      return EINA_FALSE;
+
    /* Return */
    *next = (Evas_Object *)obj;