diff options
author | John Reck <jreck@google.com> | 2012-05-30 10:30:00 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-30 10:30:00 -0700 |
commit | f788adcf8b3be878d174f5b7c2396c0d19540d7f (patch) | |
tree | 16d02797ebb74ea6533da96672794648f88a7435 | |
parent | 06b7e0fafdee08f7045f419b19eb1aacb00d7d60 (diff) | |
parent | fcb6095b9140296cf3b5a4af3107500ee943bacc (diff) | |
download | packages_apps_Browser-f788adcf8b3be878d174f5b7c2396c0d19540d7f.zip packages_apps_Browser-f788adcf8b3be878d174f5b7c2396c0d19540d7f.tar.gz packages_apps_Browser-f788adcf8b3be878d174f5b7c2396c0d19540d7f.tar.bz2 |
Merge "Make sure focusSearch doesn't return a detached webview" into jb-dev
-rw-r--r-- | src/com/android/browser/TitleBar.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java index ffe5553..d3e8f7c 100644 --- a/src/com/android/browser/TitleBar.java +++ b/src/com/android/browser/TitleBar.java @@ -405,8 +405,10 @@ public class TitleBar extends RelativeLayout { @Override public View focusSearch(View focused, int dir) { - if (FOCUS_DOWN == dir && hasFocus()) { - return getCurrentWebView(); + WebView web = getCurrentWebView(); + if (FOCUS_DOWN == dir && hasFocus() + && web.hasFocusable() && web.getParent() != null) { + return web; } return super.focusSearch(focused, dir); } |