Hide clipboard window when tapping except editfield
authorTaeyun An <ty.an@samsung.com>
Mon, 15 Apr 2013 12:03:56 +0000 (21:03 +0900)
committerGerrit Code Review <gerrit2@kim11>
Mon, 15 Apr 2013 12:21:40 +0000 (21:21 +0900)
[Title] Hide clipboard window when tapping except editfield
[Issue#] P130412-5414
[Problem] Clipboard windows doesn't disappear when tapping back button.
[Cause] There already exist the hide code but before hide Clipboard window it returned.
[Solution] Move the code to top of the method.

Change-Id: I016b9f994bb5de8af790e808547b895853a78ca8

Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp

index 3f9bd0d..e9decb1 100755 (executable)
@@ -446,9 +446,6 @@ void InputMethodContextEfl::onFocusIn()
 
 void InputMethodContextEfl::onFocusOut()
 {
-    if (!m_context || !m_focused)
-        return;
-
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
     if (m_state != ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
         if (m_viewImpl->pageClient->isClipboardWindowOpened())
@@ -456,6 +453,9 @@ void InputMethodContextEfl::onFocusOut()
     }
 #endif
 
+    if (!m_context || !m_focused)
+        return;
+
     ecore_imf_context_input_panel_hide(m_context.get());
     ecore_imf_context_focus_out(m_context.get());
 }
@@ -568,9 +568,6 @@ void InputMethodContextEfl::showIMFContext(const EditorState& editor)
 
 void InputMethodContextEfl::hideIMFContext()
 {
-    if (!m_context || !m_focused)
-        return;
-
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
     if (m_state != ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
         if (m_viewImpl->pageClient->isClipboardWindowOpened())
@@ -578,6 +575,9 @@ void InputMethodContextEfl::hideIMFContext()
     }
 #endif
 
+    if (!m_context || !m_focused)
+        return;
+
     if (m_viewImpl->page()->editorState().hasComposition)
         m_viewImpl->page()->cancelComposition();