Index: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
index a88405063d3727f264b9f1226c9c57c1cb2bc31c..a4fbf2d71cd3f5b1253d99aabcefe5e1fec1a21f 100644 |
--- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
+++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
@@ -140,6 +140,19 @@ public class ChromeShellToolbar extends LinearLayout { |
} |
} |
}); |
+ mUrlTextView.setOnKeyListener(new OnKeyListener() { |
+ @Override |
+ public boolean onKey(View v, int keyCode, KeyEvent event) { |
+ if (keyCode == KeyEvent.KEYCODE_BACK) { |
+ mUrlTextView.clearFocus(); |
+ if (mTab != null) { |
+ mTab.getView().requestFocus(); |
+ } |
+ return true; |
+ } |
+ return false; |
+ } |
+ }); |
mSuggestionPopup = new SuggestionPopup(getContext(), mUrlTextView, this); |
mUrlTextView.addTextChangedListener(mSuggestionPopup); |