Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2915)

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/Shell.java

Issue 540853002: Remove focus on back key press if focus is on url bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modified code as suggested. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/java/src/org/chromium/content_shell/Shell.java
diff --git a/content/shell/android/java/src/org/chromium/content_shell/Shell.java b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
index 5223bfe66c4440b25eda13c2999fde6e95cdf11d..5940b5b2ad30ddcfb9ac72f06a20a9a90d9b174d 100644
--- a/content/shell/android/java/src/org/chromium/content_shell/Shell.java
+++ b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
@@ -166,6 +166,16 @@ public class Shell extends LinearLayout {
}
}
});
+ mUrlTextView.setOnKeyListener(new OnKeyListener() {
+ @Override
+ public boolean onKey(View v, int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_BACK) {
+ mContentViewCore.getContainerView().requestFocus();
+ return true;
+ }
+ return false;
+ }
+ });
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698