From db6d939d2bbf457b1caa5479a60dae5e90d023e1 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Tue, 15 Sep 2009 13:13:23 -0400 Subject: [PATCH] if the cursor and focus don't match, match them on text view clicks Call nativeMotionUp from touchUpOnTextField to move the mouse cursor to the text field if necessary before moving the text caret to the desired position. Fixes http://b/issue?id=2075647 --- core/java/android/webkit/WebView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 47a97b89063b0..953fc3e1b8cf3 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -4916,6 +4916,9 @@ public class WebView extends AbsoluteLayout // In case the soft keyboard has been dismissed, bring it back up. InputMethodManager.getInstance(getContext()).showSoftInput(mWebTextView, 0); + if (nativeFocusNodePointer() != nativeCursorNodePointer()) { + nativeMotionUp(x, y, mNavSlop); + } nativeTextInputMotionUp(x, y); }