Set focus on popup after datetime picker is dismissed
authorKwangYong Choi <ky0.choi@samsung.com>
Tue, 20 Aug 2013 11:32:43 +0000 (20:32 +0900)
committerKwangYong Choi <ky0.choi@samsung.com>
Tue, 20 Aug 2013 11:32:43 +0000 (20:32 +0900)
[Title] Set focus on popup after datetime picker is dismissed.
[Issue#] N_SE-48968
[Problem] ewk view is focused after datetime picker is dismissed.
[Cause] No focus handling.
[Solution] Explictly set focus on popup after datetime picker is dismissed.

Change-Id: If5ee1a582c4001b591c9666d73116c41eb0cfe0f

Source/WebKit2/UIProcess/API/efl/tizen/InputPicker.cpp

index 75ba53f..39e4d0d 100755 (executable)
@@ -56,6 +56,10 @@ static void _edit_start_cb(void* data, Evas_Object* obj, void* event_info)
 
 static void _edit_end_cb(void* data, Evas_Object* obj, void* event_info)
 {
+    // Set focus on 1st popup.
+    Input_Picker_Layout* pickerLayout = (Input_Picker_Layout*)data;
+    elm_object_focus_set(pickerLayout->popup, true);
+
     if (!EflAssistHandle)
         return;
 
@@ -678,7 +682,7 @@ void InputPicker::ewk_date_popup(const char* inputValue)
 
 #if ENABLE(TIZEN_HW_MORE_BACK_KEY)
     evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,start", _edit_start_cb, 0);
-    evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,end", _edit_end_cb, 0);
+    evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,end", _edit_end_cb, m_pickerLayout);
 #endif
 
     m_pickerLayout->okButton = elm_button_add(m_pickerLayout->popup);
@@ -887,7 +891,7 @@ void InputPicker::ewk_week_popup(const char* inputValue)
 
 #if ENABLE(TIZEN_HW_MORE_BACK_KEY)
     evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,start", _edit_start_cb, 0);
-    evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,end", _edit_end_cb, 0);
+    evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,end", _edit_end_cb, m_pickerLayout);
 #endif
 
     m_pickerLayout->okButton = elm_button_add(m_pickerLayout->popup);
@@ -978,7 +982,7 @@ void InputPicker::ewk_time_popup(const char* inputValue)
 
 #if ENABLE(TIZEN_HW_MORE_BACK_KEY)
     evas_object_smart_callback_add(m_pickerLayout->timePicker, "edit,start", _edit_start_cb, 0);
-    evas_object_smart_callback_add(m_pickerLayout->timePicker, "edit,end", _edit_end_cb, 0);
+    evas_object_smart_callback_add(m_pickerLayout->timePicker, "edit,end", _edit_end_cb, m_pickerLayout);
 #endif
 
     m_pickerLayout->okButton = elm_button_add(m_pickerLayout->popup);
@@ -1072,7 +1076,7 @@ void InputPicker::ewk_month_popup(const char* inputValue)
 
 #if ENABLE(TIZEN_HW_MORE_BACK_KEY)
     evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,start", _edit_start_cb, 0);
-    evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,end", _edit_end_cb, 0);
+    evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,end", _edit_end_cb, m_pickerLayout);
 #endif
 
     m_pickerLayout->okButton = elm_button_add(m_pickerLayout->popup);
@@ -1194,7 +1198,7 @@ void InputPicker::ewk_datetime_popup(const char* inputValue, bool local)
 
 #if ENABLE(TIZEN_HW_MORE_BACK_KEY)
     evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,start", _edit_start_cb, 0);
-    evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,end", _edit_end_cb, 0);
+    evas_object_smart_callback_add(m_pickerLayout->datePicker, "edit,end", _edit_end_cb, m_pickerLayout);
 #endif
 
     m_pickerLayout->timePicker = elm_datetime_add(m_pickerLayout->layout);
@@ -1204,7 +1208,7 @@ void InputPicker::ewk_datetime_popup(const char* inputValue, bool local)
 
 #if ENABLE(TIZEN_HW_MORE_BACK_KEY)
     evas_object_smart_callback_add(m_pickerLayout->timePicker, "edit,start", _edit_start_cb, 0);
-    evas_object_smart_callback_add(m_pickerLayout->timePicker, "edit,end", _edit_end_cb, 0);
+    evas_object_smart_callback_add(m_pickerLayout->timePicker, "edit,end", _edit_end_cb, m_pickerLayout);
 #endif
 
     m_pickerLayout->okButton = elm_button_add(m_pickerLayout->popup);