From 1bd0d6a53f27b38c10db265f8d85c89eaea527f1 Mon Sep 17 00:00:00 2001 From: Leon Scroggins Date: Tue, 16 Jun 2009 15:04:28 -0400 Subject: [PATCH] Allow proper text editing after clicking with the trackball. As with the recent change to make a touch bring up the WebTextView, so that the trackball can be used, and we get text editing goodness, we also need to bring up the WebTextView when clicking the trackball. Also do not call overrideUrlLoading for an input field and add a comment. --- core/java/android/webkit/WebView.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 41e007ea32a4e..d86a860cca5b6 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -4582,6 +4582,9 @@ public class WebView extends AbsoluteLayout break; } case SWITCH_TO_CLICK: + // The user clicked with the trackball, and did not click a + // second time, so perform the action of a trackball single + // click mTouchMode = TOUCH_DONE_MODE; Rect visibleRect = sendOurVisibleRect(); // Note that sendOurVisibleRect calls viewToContent, so the @@ -4593,9 +4596,14 @@ public class WebView extends AbsoluteLayout mWebViewCore.sendMessage(EventHub.SET_MOVE_MOUSE, cursorData()); playSoundEffect(SoundEffectConstants.CLICK); - if (!mCallbackProxy.uiOverrideUrlLoading(nativeCursorText())) { + boolean isTextInput = nativeCursorIsTextInput(); + if (isTextInput || !mCallbackProxy.uiOverrideUrlLoading( + nativeCursorText())) { mWebViewCore.sendMessage(EventHub.CLICK); } + if (isTextInput) { + rebuildWebTextView(); + } break; case SCROLL_BY_MSG_ID: setContentScrollBy(msg.arg1, msg.arg2, (Boolean) msg.obj);