Bug 885353 - Don't focus entry and show keyboard on new tab (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Fri, 12 Jul 2013 19:39:55 +0100
changeset 143402 84d09b3378b4ab720df8cfd32be036b08470e529
parent 143401 f3f76c0ea2ce93ec8787afc7955c3d28ee1ecadf
child 143403 45ae7d54666f9a1cb65ef9991962fc2fe98beca7
push id25130
push userlrocha@mozilla.com
push dateWed, 21 Aug 2013 09:41:27 +0000
treeherdermozilla-central@b2486721572e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs885353
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 885353 - Don't focus entry and show keyboard on new tab (r=mfinkle)
mobile/android/base/BrowserToolbar.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -1221,18 +1221,21 @@ public class BrowserToolbar extends Geck
         InputMethodManager imm =
                (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
         imm.showSoftInput(mUrlEditText, InputMethodManager.SHOW_IMPLICIT);
     }
 
     private void showUrlEditContainer() {
         mUrlDisplayContainer.setVisibility(View.GONE);
         mUrlEditContainer.setVisibility(View.VISIBLE);
-        mUrlEditText.requestFocus();
-        showSoftInput();
+
+        if (mEditingTarget != EditingTarget.NEW_TAB) {
+            mUrlEditText.requestFocus();
+            showSoftInput();
+        }
     }
 
     private void hideUrlEditContainer() {
         mUrlDisplayContainer.setVisibility(View.VISIBLE);
         mUrlEditContainer.setVisibility(View.GONE);
     }
 
     public EditingTarget getEditingTarget() {