From 10be4fc63a0d43262f1cfeac3b4a7904fa8fbc14 Mon Sep 17 00:00:00 2001 From: Leon Scroggins Date: Mon, 20 Jul 2009 14:26:37 -0400 Subject: [PATCH] Do not hide the soft keyboard when the DOM has moved focus. Instead of calling remove(), which would hide the soft keyboard, remove the WebTextView manually, so the soft keyboard remains up (if it was up to begin with). WebView will properly handle the keys now that the focus has changed. --- core/java/android/webkit/WebTextView.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/java/android/webkit/WebTextView.java b/core/java/android/webkit/WebTextView.java index 2be74851aa170..da1443c6db3e7 100644 --- a/core/java/android/webkit/WebTextView.java +++ b/core/java/android/webkit/WebTextView.java @@ -118,7 +118,11 @@ import java.util.ArrayList; if (!isArrowKey && mWebView.nativeFocusNodePointer() != mNodePointer) { mWebView.nativeClearCursor(); - remove(); + // Do not call remove() here, which hides the soft keyboard. If + // the soft keyboard is being displayed, the user will still want + // it there. + mWebView.removeView(this); + mWebView.requestFocus(); return mWebView.dispatchKeyEvent(event); }