Bug 684805 Followup to fix per-tab active state ignoring minimised state r=IanN a=Callek.
--- a/suite/browser/tabbrowser.xml
+++ b/suite/browser/tabbrowser.xml
@@ -995,16 +995,17 @@
this.mLastRelatedIndex = 0;
var newBrowser = this.mPanelContainer.selectedPanel.firstChild;
// Transfer the dropped link handler to the new browser.
// Note: closing the current tab sets mCurrentBrowser to null
// so we use mCurrentTab.linkedBrowser instead.
newBrowser.droppedLinkHandler = this.mCurrentTab.linkedBrowser.droppedLinkHandler;
newBrowser.showWindowResizer = this.mCurrentTab.linkedBrowser.showWindowResizer;
+ newBrowser.docShellIsActive = this.mCurrentTab.linkedBrowser.docShellIsActive;
if (this.mCurrentBrowser) {
this.mCurrentBrowser.droppedLinkHandler = null;
// Only save the focused element if it is in our content window
// or in an ancestor window.
var focusedWindow = document.commandDispatcher.focusedWindow;
var saveFocus = false;
if (focusedWindow && focusedWindow.top == window.content) {
@@ -1041,21 +1042,19 @@
// Only blur the focused element if it isn't a tab,
// to avoid breaking keyboard tab navigation
this.mCurrentBrowser.focusedWindow
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils)
.focus(null);
}
this.mCurrentBrowser.setAttribute("type", "content-targetable");
- this.mCurrentBrowser.docShell.isActive = false;
}
newBrowser.setAttribute("type", "content-primary");
- newBrowser.docShell.isActive = true;
this.mCurrentBrowser = newBrowser;
this.mCurrentTab = this.selectedTab;
this.mCurrentTab.removeAttribute("unread");
var tabListener = this.mTabListeners[this.tabContainer.selectedIndex];
// Update the URL bar.
this.updateUrlBar(newBrowser.webProgress,
null,
@@ -1470,16 +1469,19 @@
// browser element, which fires off a bunch of notifications. Some
// of those notifications can cause code to run that inspects our
// state, so it is important that the tab element is fully
// initialized by this point.
this.mPanelContainer.appendChild(n);
b.addEventListener("DOMTitleChanged", this.onTitleChanged, true);
+ // We start our browsers out as inactive.
+ b.docShellIsActive = false;
+
this.mStrip.collapsed = false;
this.mPrefs.setBoolPref("browser.tabs.forceHide", false);
// wire up a progress listener for the new browser object.
var position = this.tabs.length - 1;
var tabListener = this.mTabProgressListener(t, b, blank);
const filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"]
@@ -1525,20 +1527,16 @@
}
if (aFocusNewTab) {
var parentTab = this.selectedTab;
this.selectedTab = t;
this.mPreviousTab = parentTab;
}
else {
- // We start our browsers out as inactive, and then maintain
- // activeness in the tab switcher.
- b.docShell.isActive = false;
-
// The user opened a background tab, so updateCurrentBrowser
// won't be called. Explicitly clear the previous tab.
this.mPreviousTab = null;
}
this.tabContainer._handleNewTab(t);
var evt = document.createEvent("Events");
evt.initEvent("TabOpen", true, false);