diff options
author | John Reck <jreck@google.com> | 2012-05-30 10:32:48 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-05-30 10:32:48 -0700 |
commit | 5c1e9e1adaac9de35a0cf5976f6a78d178d3e2be (patch) | |
tree | 2e401e2760dc56f8a41bc91d38b0ed94be394bf1 /src | |
parent | 9ba16e8dd1107646ef408b051572eed241831c74 (diff) | |
parent | f788adcf8b3be878d174f5b7c2396c0d19540d7f (diff) | |
download | packages_apps_Browser-5c1e9e1adaac9de35a0cf5976f6a78d178d3e2be.zip packages_apps_Browser-5c1e9e1adaac9de35a0cf5976f6a78d178d3e2be.tar.gz packages_apps_Browser-5c1e9e1adaac9de35a0cf5976f6a78d178d3e2be.tar.bz2 |
am f788adcf: Merge "Make sure focusSearch doesn\'t return a detached webview" into jb-dev
* commit 'f788adcf8b3be878d174f5b7c2396c0d19540d7f':
Make sure focusSearch doesn't return a detached webview
Diffstat (limited to 'src')
-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); } |