OSDN Git Service

Revert "Do not allow javascript to change window focus."
authorPatrick Scott <phanna@android.com>
Wed, 18 Nov 2009 20:00:30 +0000 (15:00 -0500)
committerPatrick Scott <phanna@android.com>
Thu, 19 Nov 2009 14:19:57 +0000 (09:19 -0500)
This reverts commit 9861276c209425ef5e92d01f0bf1cc65cf86e382.

src/com/android/browser/Tab.java

index 447e6be..3bb136c 100644 (file)
@@ -660,6 +660,14 @@ class Tab {
         }
 
         @Override
+        public void onRequestFocus(WebView view) {
+            if (!mInForeground) {
+                mActivity.switchToTab(mActivity.getTabControl().getTabIndex(
+                        Tab.this));
+            }
+        }
+
+        @Override
         public void onCloseWindow(WebView window) {
             if (mParentTab != null) {
                 // JavaScript can only close popup window.