Bug 1367621 - Make sure to focus the URL bar for 'empty' tabs even while in full screen. r=Felipe
authorMike Conley <mconley@mozilla.com>
Fri, 26 May 2017 11:36:53 -0400
changeset 409116 f8c4c8424429b4d362f4a58c17f2d7a1b598347c
parent 409115 c4633ac3f49c3f3a8bdcc31df3720672f103939c
child 409117 50861508d55945e642a3803dcdf0c95084dfee66
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe
bugs1367621
milestone55.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 1367621 - Make sure to focus the URL bar for 'empty' tabs even while in full screen. r=Felipe In the e10s-case, we might be calling _adjustFocusAfterTabSwitch before updateCurrentBrowser has been called, meaning that mCurrentTab hasn't been updated yet. We use the newTab argument instead. MozReview-Commit-ID: A2ZvbyxSs8t
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1340,17 +1340,17 @@
           // If the user happened to type into the URL bar for this browser
           // by the time we got here, focusing will cause the text to be
           // selected which could cause them to overwrite what they've
           // already typed in.
           if (gURLBar.focused && newBrowser.userTypedValue) {
             return;
           }
 
-          if (!window.fullScreen || isTabEmpty(this.mCurrentTab)) {
+          if (!window.fullScreen || isTabEmpty(newTab)) {
             focusAndSelectUrlBar();
             return;
           }
         }
 
         // Focus the find bar if it was previously focused for that tab.
         if (gFindBarInitialized && !gFindBar.hidden &&
             this.selectedTab._findBarFocused) {