elc_naviframe: set focus to new view immediately only for item push 62/143762/1 accepted/tizen/3.0/common/20170816.145158 accepted/tizen/3.0/ivi/20170816.131253 accepted/tizen/3.0/mobile/20170816.131228 accepted/tizen/3.0/tv/20170816.131138 accepted/tizen/3.0/wearable/20170816.131152 submit/tizen_3.0/20170816.054926
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 11 Aug 2017 07:06:48 +0000 (16:06 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 11 Aug 2017 07:07:51 +0000 (16:07 +0900)
Set focus to new item view immediately when new item is pushed to show
keypad fast. Otherwise, focus of new item view is set late and keypad is
shown late.

Setting focus to item view immediately is applied to item push only.
Because if this concept is applied to item pop, then the following focus
issue happens.

Reproduction path of the item pop focus issue
1. Naviframe first item view consists of two objects.
   Focus is in the second object of the first item view.
2. Naviframe push happens. (now two item views)
3. Popup appears and it gets the focus.
4. Popup button click pops the second naviframe item.
5. Focus goes to the naviframe and focus_next happens.
6. Focus is set to the first object of the first item view.
   (not to the second object of the first item view)

Change-Id: I1940831dbd9ce0cf8efcd6b2172203fa1ee277fc

src/lib/elc_naviframe.c

index 2ea4862b463e7b69fa901823f83bf97801ab1a8c..4124ba5f1bfe4849b96b776a88a25f8009e3cae4 100644 (file)
@@ -1318,7 +1318,11 @@ _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);
+   /* TIZEN_ONLY(20170811): Set focus to new item view immediately when new item is pushed to show keypad fast. */
+   //elm_widget_tree_unfocusable_set(VIEW(it), EINA_FALSE);
+   if (!it->pushing)
+     elm_widget_tree_unfocusable_set(VIEW(it), EINA_FALSE);
+   /* END */
    _prev_page_focus_recover(it);
 
    if (sd->freeze_events)
@@ -1803,7 +1807,10 @@ _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_TRUE);
+        /* TIZEN_ONLY(20170811): Set focus to new item view immediately when new item is pushed to show keypad fast. */
+        //elm_widget_tree_unfocusable_set(VIEW(item), EINA_TRUE);
+        elm_widget_tree_unfocusable_set(VIEW(item), EINA_FALSE);
+        /* END */
         elm_widget_tree_unfocusable_set(VIEW(top_item), EINA_TRUE);
 
         if (sd->freeze_events)