OSDN Git Service

When opening the IME or sending a key to a non-cursored textfield, set the default...
authorLeon Scroggins <scroggo@google.com>
Wed, 24 Feb 2010 21:49:35 +0000 (16:49 -0500)
committerLeon Scroggins <scroggo@google.com>
Thu, 25 Feb 2010 17:49:29 +0000 (12:49 -0500)
Fix for http://b/issue?id=2431351

core/java/android/webkit/WebView.java

index c1a4a49..b13fc75 100644 (file)
@@ -3369,6 +3369,7 @@ public class WebView extends AbsoluteLayout
         if (isTextView) {
             rebuildWebTextView();
             if (inEditingMode()) {
+                mWebTextView.setDefaultSelection();
                 imm.showSoftInput(mWebTextView, 0);
                 if (zoom) {
                     didUpdateTextViewBounds(true);
@@ -3686,6 +3687,7 @@ public class WebView extends AbsoluteLayout
             // might be.  Check it, and if so, hand over to the WebTextView.
             rebuildWebTextView();
             if (inEditingMode()) {
+                mWebTextView.setDefaultSelection();
                 return mWebTextView.dispatchKeyEvent(event);
             }
         }