diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 254ab69ecd0..10e414c0540 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -6769,8 +6769,8 @@ var gBookmarkAllTabsHandler = { this._command = document.getElementById("Browser:BookmarkAllTabs"); gBrowser.tabContainer.addEventListener("TabOpen", this, true); gBrowser.tabContainer.addEventListener("TabClose", this, true); - gBrowser.tabContainer.addEventListener("TabSelect", this, true); - gBrowser.tabContainer.addEventListener("TabMove", this, true); + gBrowser.tabContainer.addEventListener("TabShow", this, true); + gBrowser.tabContainer.addEventListener("TabHide", this, true); this._updateCommandState(); }, diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 3dabb9f20de..5f31ae679fe 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -769,7 +769,7 @@ newBrowser.docShell.isActive = true; this.mCurrentBrowser = newBrowser; this.mCurrentTab = this.selectedTab; - this.mCurrentTab.hidden = false; + this.showTab(this.mCurrentTab); if (updatePageReport) this.mCurrentBrowser.updatePageReport(); @@ -1791,8 +1791,39 @@ + + + + + + + + + + + + + + diff --git a/browser/base/content/tabview/ui.js b/browser/base/content/tabview/ui.js index be4c1899e47..7b9641a346b 100644 --- a/browser/base/content/tabview/ui.js +++ b/browser/base/content/tabview/ui.js @@ -125,7 +125,7 @@ var UIManager = { iQ(window).bind("beforeunload", function() { Array.forEach(gBrowser.tabs, function(tab) { - tab.hidden = false; + gBrowser.showTab(tab); }); }); iQ(window).bind("unload", function() { diff --git a/browser/base/content/test/Makefile.in b/browser/base/content/test/Makefile.in index 018c2a4c1e8..0e4f2c7f8ea 100644 --- a/browser/base/content/test/Makefile.in +++ b/browser/base/content/test/Makefile.in @@ -171,6 +171,7 @@ _BROWSER_FILES = \ browser_visibleTabs.js \ browser_visibleTabs_contextMenu.js \ browser_visibleTabs_bookmarkAllPages.js \ + browser_visibleTabs_bookmarkAllTabs.js \ browser_visibleTabs_tabPreview.js \ discovery.html \ moz.png \ diff --git a/browser/base/content/test/browser_visibleTabs_bookmarkAllPages.js b/browser/base/content/test/browser_visibleTabs_bookmarkAllPages.js index f0c0f80ea37..8c204c594b1 100644 --- a/browser/base/content/test/browser_visibleTabs_bookmarkAllPages.js +++ b/browser/base/content/test/browser_visibleTabs_bookmarkAllPages.js @@ -58,7 +58,7 @@ function test() { gBrowser.removeTab(tabOne); gBrowser.removeTab(tabTwo); Array.forEach(gBrowser.tabs, function(tab) { - tab.hidden = false; + gBrowser.showTab(tab); }); finish();