Bug 1367621 - Make sure to focus the URL bar for 'empty' tabs even while in full screen. r?felipe draft
authorMike Conley <mconley@mozilla.com>
Fri, 26 May 2017 11:36:53 -0400
changeset 585659 c47a13ef3898e3f3653601ba9042499a7dd540ff
parent 585005 44e41de60c48a94a004494dd48f57dd1d8c157d8
child 585660 4c61f2aa4a94471bc6d3f2bd1e71ec291f5a8381
push id61164
push usermconley@mozilla.com
push dateSat, 27 May 2017 18:28:26 +0000
reviewersfelipe
bugs1367621
milestone55.0a1
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) {