Fix keypad issue when ime context transit to another context
authorSangYong Park <sy302.park@samsung.com>
Fri, 19 Jul 2013 08:35:27 +0000 (17:35 +0900)
committerSangYong Park <sy302.park@samsung.com>
Thu, 1 Aug 2013 06:06:05 +0000 (15:06 +0900)
[Title] Fix keypad issue when ime context transit to another context
[Issue#] FMM-2019 N_SE-47635
[Problem] Keypad was closed when ime context transit to another context
[Cause] Do not handle show keypad callback by ime context transition
[Solution] Handle show keypad callback by ime context transition

Change-Id: I591f5220a8663e2087ee972a14149ee37d4e8896

Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp

index b6f0293..15b8b5a 100755 (executable)
@@ -379,20 +379,10 @@ void InputMethodContextEfl::updateTextInputStateByUserAction(bool setFocus)
     const EditorState& editor = m_viewImpl->page()->editorState();
 
     if (editor.isContentEditable) {
-        showIMFContext(editor, true);
-#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
-        if (editor.inputMethodHints == "date"
-            || editor.inputMethodHints == "datetime"
-            || editor.inputMethodHints == "datetime-local"
-            || editor.inputMethodHints == "month"
-            || editor.inputMethodHints == "time"
-            || editor.inputMethodHints == "week") {
-            if (m_inputPickerType == -1)
-                return;
-        }
-#endif
         if (setFocus)
             evas_object_focus_set(m_viewImpl->view(), true);
+
+        showIMFContext(editor, true);
     } else
         hideIMFContext();
 }
@@ -591,11 +581,16 @@ void InputMethodContextEfl::resetIMFContext()
 void InputMethodContextEfl::showIMFContext(const EditorState& editor, bool isUserAction)
 {
     Ewk_Settings* settings = ewk_view_settings_get(m_viewImpl->view());
-    if (!isUserAction) {
+    bool isContextTransition = (m_context ? m_contextID != editor.inputMethodContextID : m_state != ECORE_IMF_INPUT_PANEL_STATE_HIDE);
+
+    if (!isUserAction && !isContextTransition) {
         if (!ewk_settings_uses_keypad_without_user_action_get(settings) || (m_focused && m_contextID == editor.inputMethodContextID))
             return;
     }
 
+    if (m_contextID != editor.inputMethodContextID)
+        hideIMFContext();
+
     m_focused = true;
 
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
@@ -616,7 +611,6 @@ void InputMethodContextEfl::showIMFContext(const EditorState& editor, bool isUse
 
     if (m_inputPickerType >= 0) {
         showInputPicker(editor);
-        revertIMFContext();
         m_contextID = editor.inputMethodContextID;
 
         return;
@@ -639,7 +633,6 @@ void InputMethodContextEfl::showIMFContext(const EditorState& editor, bool isUse
         else
             ewkViewDataListShowRequest(m_viewImpl->view(), EWK_INPUT_TYPE_TEXT, optionList);
 
-        revertIMFContext();
         m_contextID = editor.inputMethodContextID;
 
         return;