Revert "Do not allow javascript to change window focus."
This reverts commit 9861276c209425ef5e92d01f0bf1cc65cf86e382.
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index 447e6be..3bb136c 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -660,6 +660,14 @@
}
@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.