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
--- 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) {