Set focus on popup when picker popup is displayed
authorKwangYong Choi <ky0.choi@samsung.com>
Tue, 25 Jun 2013 04:26:17 +0000 (13:26 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 25 Jun 2013 05:30:34 +0000 (05:30 +0000)
[Title] Set focus on popup when picker popup is displayed.
[Issue#] N_SE-42734
[Problem] Keyboard input is inserted in webview even though webview is suspended.
[Cause] N/A
[Solution] Move focus to popup from webview.

Change-Id: I858e8fb3fa80d15231a1a6dc7d106224b4ddc758

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

index 87b29d8..a848788 100755 (executable)
@@ -257,6 +257,7 @@ void InputPicker::showDataList(Ewk_Input_Type inputType, Eina_List* optionList)
     elm_object_part_content_set(m_pickerLayout->popup, "button1", m_pickerLayout->okButton);
     evas_object_smart_callback_add(m_pickerLayout->okButton, "clicked", _data_list_popup_response_cb, this);
     evas_object_show(m_pickerLayout->popup);
+    evas_object_focus_set(m_pickerLayout->okButton, true);
 
     Evas_Object* cancelButton = elm_button_add(m_pickerLayout->popup);
     elm_object_style_set(cancelButton, "popup_button/default");
@@ -498,6 +499,7 @@ void InputPicker::ewk_color_popup(int r, int g, int b)
     elm_object_text_set(m_pickerLayout->okButton, "OK");
     elm_object_part_content_set(m_pickerLayout->popup, "button1", m_pickerLayout->okButton);
     evas_object_smart_callback_add(m_pickerLayout->okButton, "clicked", _color_popup_response_cb, this);
+    evas_object_focus_set(m_pickerLayout->okButton, true);
 
     evas_object_show(m_pickerLayout->popup);
 }
@@ -590,6 +592,7 @@ void InputPicker::ewk_date_popup(const char* inputValue)
     elm_object_text_set(m_pickerLayout->okButton, "OK");
     elm_object_part_content_set(m_pickerLayout->popup, "button1", m_pickerLayout->okButton);
     evas_object_smart_callback_add(m_pickerLayout->okButton, "clicked", _date_popup_response_cb, this);
+    evas_object_focus_set(m_pickerLayout->okButton, true);
 
     elm_object_content_set(m_pickerLayout->popup, m_pickerLayout->layout);
     evas_object_show(m_pickerLayout->popup);
@@ -780,6 +783,7 @@ void InputPicker::ewk_week_popup(const char* inputValue)
     elm_object_text_set(m_pickerLayout->okButton, "OK");
     elm_object_part_content_set(m_pickerLayout->popup, "button1", m_pickerLayout->okButton);
     evas_object_smart_callback_add(m_pickerLayout->okButton, "clicked", _week_popup_response_cb, this);
+    evas_object_focus_set(m_pickerLayout->okButton, true);
 
     elm_object_content_set(m_pickerLayout->popup, m_pickerLayout->layout);
     evas_object_show(m_pickerLayout->popup);
@@ -850,6 +854,7 @@ void InputPicker::ewk_time_popup(const char* inputValue)
     elm_object_style_set(m_pickerLayout->okButton, "popup_button/default");
     elm_object_text_set(m_pickerLayout->okButton, "OK");
     elm_object_part_content_set(m_pickerLayout->popup, "button1", m_pickerLayout->okButton);
+    evas_object_focus_set(m_pickerLayout->okButton, true);
 
     evas_object_smart_callback_add(m_pickerLayout->okButton, "clicked", _time_popup_response_cb, this);
     elm_object_content_set(m_pickerLayout->popup, m_pickerLayout->layout);
@@ -927,6 +932,7 @@ void InputPicker::ewk_month_popup(const char* inputValue)
     elm_object_text_set(m_pickerLayout->okButton, "OK");
     elm_object_part_content_set(m_pickerLayout->popup, "button1", m_pickerLayout->okButton);
     evas_object_smart_callback_add(m_pickerLayout->okButton, "clicked", _month_popup_response_cb, this);
+    evas_object_focus_set(m_pickerLayout->okButton, true);
 
     elm_object_content_set(m_pickerLayout->popup, m_pickerLayout->layout);
     evas_object_show(m_pickerLayout->popup);
@@ -1020,6 +1026,7 @@ void InputPicker::ewk_datetime_popup(const char* inputValue, bool local)
     elm_object_style_set(m_pickerLayout->okButton, "popup_button/default");
     elm_object_text_set(m_pickerLayout->okButton, "OK");
     elm_object_part_content_set(m_pickerLayout->popup, "button1", m_pickerLayout->okButton);
+    evas_object_focus_set(m_pickerLayout->okButton, true);
 
     evas_object_smart_callback_add(m_pickerLayout->okButton, "clicked", _datetime_popup_response_cb, this);
     elm_object_content_set(m_pickerLayout->popup, m_pickerLayout->layout);