Bug 609903 - Closing a tab opened in background produces lock/unlock toolbar inbalance [r=vingtetun]
authorMark Finkle <mfinkle@mozilla.com>
Wed, 10 Nov 2010 11:27:30 -0500
changeset 66985 4cd3a54d290a3adbb2512d501e17e301b9c1b1d1
parent 66984 c885719af03565c9aff7a21f3746d3311aebdad5
child 66986 25f36d139601f861eeeba07b803265f1c7484b06
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvingtetun
bugs609903
Bug 609903 - Closing a tab opened in background produces lock/unlock toolbar inbalance [r=vingtetun]
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -670,17 +670,17 @@ var Browser = {
   closeTab: function(tab) {
     if (tab instanceof XULElement)
       tab = this.getTabFromChrome(tab);
 
     if (!tab)
       return;
 
     // Make sure we leave the toolbar in an unlocked state
-    if (tab.isLoading())
+    if (tab == this._selectedTab && tab.isLoading())
       BrowserUI.unlockToolbar();
 
     let tabIndex = this._tabs.indexOf(tab);
     if (tabIndex == -1)
       return;
 
     let nextTab = this._selectedTab;
     if (nextTab == tab) {