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..c04d8c57ec939c203c17858ff6f72aaf897bf5dd 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 (event != null && keyCode == KeyEvent.KEYCODE_BACK) { |
Bernhard Bauer
2014/08/26 07:46:10
Is this actually called with a null event?
ankit
2014/08/26 08:16:32
I did not encounter any scenario when it was getti
Bernhard Bauer
2014/08/26 08:20:43
I would rather not add it. Your assumption (and mi
|
+ mUrlTextView.clearFocus(); |
+ if (mTab != null) { |
+ mTab.getView().requestFocus(); |
+ } |
+ return true; |
+ } |
+ return false; |
+ } |
+ }); |
mSuggestionPopup = new SuggestionPopup(getContext(), mUrlTextView, this); |
mUrlTextView.addTextChangedListener(mSuggestionPopup); |