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

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: 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 bc870ab889c8db0da759c3f1cb559d6a7bb66380..9313ed000b507befcea6768dbb8468cb1939f5d6 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,17 @@ public class Shell extends LinearLayout {
}
}
});
+ mUrlTextView.setOnKeyListener(new OnKeyListener() {
+ @Override
+ public boolean onKey(View v, int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_BACK) {
+ mUrlTextView.clearFocus();
+ mContentViewCore.getContainerView().requestFocus();
Ted C 2014/09/08 15:47:55 Is the above line necessary with this line? By re
ankit 2014/09/09 10:28:35 Done. Above line not required.
+ 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