From 10ae28556bbc622b311528ab8864e543c8bdeae0 Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Fri, 13 Aug 2010 21:08:11 -0700 Subject: [PATCH] Backed out changeset 05b4f0fbffcc --- browser/base/content/tabview/ui.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/browser/base/content/tabview/ui.js b/browser/base/content/tabview/ui.js index 2429b1ca861a..065bb2860e72 100644 --- a/browser/base/content/tabview/ui.js +++ b/browser/base/content/tabview/ui.js @@ -440,6 +440,14 @@ var UIManager = { tab.tabItem.setZoomPrep(false); self.showTabView(); } + // ToDo: When running unit tests, everything happens so quick so + // new tabs might be added after a tab is closing. Therefore, this + // hack is used. We should look for a better solution. + setTimeout(function() { // Marshal event from chrome thread to DOM thread + if ((groupItem && groupItem._children.length > 0) || + (groupItem == null && gBrowser.visibleTabs.length > 0)) + self.hideTabView(); + }, 1); } } });