Handle keypad while WebPage sets the focus automatically
authorSeokju Kwon <seokju.kwon@samsung.com>
Mon, 10 Sep 2012 08:48:26 +0000 (17:48 +0900)
committerSeokju Kwon <seokju.kwon@samsung.com>
Mon, 10 Sep 2012 09:06:34 +0000 (18:06 +0900)
[Title] Handle keypad while WebPage sets the focus automatically
[Issue#] N_SE-9788
[Problem] Keypad shows up when node get the focus automatically
[Cause] Get the focus an ediable node with clicking another node
[Solution] Add code to check a node under the mouse

Change-Id: I15a50813ede57ec23e1b42107cec1f1f4d6e4a42

Source/WebCore/page/FocusController.cpp

index 3674bd1..ace118a 100644 (file)
@@ -620,8 +620,12 @@ bool FocusController::setFocusedNode(Node* node, PassRefPtr<Frame> newFocusedFra
             && m_page->selection().selectionType() != VisibleSelection::RangeSelection
 #endif // ENABLE(TIZEN_WEBKIT_PASTEBOARD)
             ) {
-            m_page->editorClient()->handleInputMethodMousePress();
-            m_page->editorClient()->setInputMethodState(node->shouldUseInputMethod());
+            if (focusedOrMainFrame()->eventHandler()->mousePressed()
+                && focusedOrMainFrame()->eventHandler()->mousePressNode()
+                && focusedOrMainFrame()->eventHandler()->mousePressNode()->shouldUseInputMethod()) {
+                m_page->editorClient()->handleInputMethodMousePress();
+                m_page->editorClient()->setInputMethodState(true);
+            }
         }
         return true;
     }