Fix input picker issue
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / efl / InputMethodContextEfl.cpp
index a143641..2997efa 100755 (executable)
@@ -373,6 +373,18 @@ void InputMethodContextEfl::updateTextInputState()
     if (m_context)
         ecore_imf_context_cursor_position_set(m_context.get(), editor.cursorPosition);
 }
+
+void InputMethodContextEfl::updateTextInputStateByUserAction(bool setFocus)
+{
+    const EditorState& editor = m_viewImpl->page()->editorState();
+
+    if (editor.isContentEditable) {
+        showIMFContext(editor, true);
+        if (setFocus)
+            evas_object_focus_set(m_viewImpl->view(), true);
+    } else
+        hideIMFContext();
+}
 #else
 void InputMethodContextEfl::updateTextInputState()
 {
@@ -565,10 +577,10 @@ void InputMethodContextEfl::resetIMFContext()
     m_doNotHandleFakeKeyEvent = false;
 }
 
-void InputMethodContextEfl::showIMFContext(const EditorState& editor)
+void InputMethodContextEfl::showIMFContext(const EditorState& editor, bool isUserAction)
 {
     Ewk_Settings* settings = ewk_view_settings_get(m_viewImpl->view());
-    if (!editor.isTapEventHandling) {
+    if (!isUserAction) {
         if (!ewk_settings_uses_keypad_without_user_action_get(settings) || (m_focused && m_contextID == editor.inputMethodContextID))
             return;
     }