naviframe: keep unfocusable state of item before finishing item push/pop 95/117995/1
authorYoungbok Shin <youngb.shin@samsung.com>
Wed, 8 Mar 2017 05:15:56 +0000 (14:15 +0900)
committerYoungbok Shin <youngb.shin@samsung.com>
Wed, 8 Mar 2017 08:20:22 +0000 (00:20 -0800)
If item pop was started without focus at a naviframe object
and the naviframe object got focus before finising item pop,
the naviframe object could give focus to its first object of prev item.
It could ruin focus orders and failed to restore previous focused
object in the item.
To keep consistency of focus policy, same logic will be applied to
item push scenario.
@fix

Change-Id: Ia74bdce3620bd59622ef32a0cedf5fbd84815400
(cherry picked from commit ac06e3cb3b6a80069944727a35e383ad11753b0f)

src/lib/elc_naviframe.c

index 618508e4ab23c2be418fa1c986db7bcf1bb31653..3f9a9cb8a5d6ba575c4b3a7a1b7ba251d3b67c4e 100644 (file)
@@ -1303,6 +1303,7 @@ _on_item_show_finished(void *data,
      elm_object_signal_emit(VIEW(it), "elm,state,visible", "elm");
    //
 
+   elm_widget_tree_unfocusable_set(VIEW(it), EINA_FALSE);
    _prev_page_focus_recover(it);
 
    if (sd->freeze_events)
@@ -1785,7 +1786,7 @@ _item_push_helper(Elm_Naviframe_Item_Data *item)
      {
         Elm_Naviframe_Op *nfo = calloc(1, sizeof (Elm_Naviframe_Op));
 
-        elm_widget_tree_unfocusable_set(VIEW(item), EINA_FALSE);
+        elm_widget_tree_unfocusable_set(VIEW(item), EINA_TRUE);
         elm_widget_tree_unfocusable_set(VIEW(top_item), EINA_TRUE);
 
         if (sd->freeze_events)
@@ -2066,7 +2067,6 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd)
         Elm_Naviframe_Op *nfo = calloc(1, sizeof (Elm_Naviframe_Op));
 
         elm_widget_tree_unfocusable_set(VIEW(it), EINA_TRUE);
-        elm_widget_tree_unfocusable_set(VIEW(prev_it), EINA_FALSE);
 
         if (sd->freeze_events)
           {