OSDN Git Service

Fix for the missing focus in WebView form fields.
authorsusnata <susnata@google.com>
Fri, 23 Jun 2017 16:13:05 +0000 (09:13 -0700)
committerandroid-build-team Robot <android-build-team-robot@google.com>
Tue, 27 Jun 2017 22:34:00 +0000 (22:34 +0000)
This looks like a regression for WebView (58.0.3029.125) in android
'O'. But this seems to have been fixed in early version of 60 (webview).
This workaround gets us past the problem, until we get the newer version
of WebView.

Bug: 62449959
Test: Manual
Change-Id: I29883bf7d1567c1ce7be90b4efde4b3da93b99a2
(cherry picked from commit 97640400c4aa6bf05d5606ea749b54ad63de97cd)

packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java

index 582b660..849f6a9 100644 (file)
@@ -360,6 +360,9 @@ public class CaptivePortalLoginActivity extends Activity {
                 return;
             } else if (mPagesLoaded == 2) {
                 // Prevent going back to empty first page.
+                // Fix for missing focus, see b/62449959 for details. Remove it once we get a
+                // newer version of WebView (60.x.y).
+                view.requestFocus();
                 view.clearHistory();
             }
             testForCaptivePortal();