diff --git a/content/treestyletab/treestyletab.xul b/content/treestyletab/treestyletab.xul
index 777234d4..891fc244 100644
--- a/content/treestyletab/treestyletab.xul
+++ b/content/treestyletab/treestyletab.xul
@@ -144,6 +144,7 @@
diff --git a/modules/base.js b/modules/base.js
index 1efbfde5..a922479c 100644
--- a/modules/base.js
+++ b/modules/base.js
@@ -124,6 +124,7 @@ var TreeStyleTabBase = {
kNARROW_SCROLLBAR : 'treestyletab-narrow-scrollbar',
kFAVICONIZED : 'treestyletab-faviconized',
kBG_NOTIFY_PHASE : 'treestyletab-notifybgtab-phase',
+ kIGNORE_POPUP_STATE : 'treestyletab-ignore-state',
kTAB_INVERTED : 'treestyletab-tab-inverted',
kTAB_CONTENTS_INVERTED : 'treestyletab-tab-contents-inverted',
diff --git a/modules/window.js b/modules/window.js
index 0cb50682..ab9e1c69 100644
--- a/modules/window.js
+++ b/modules/window.js
@@ -1084,7 +1084,13 @@ TreeStyleTabWindow.prototype = {
this._shownPopups = this._shownPopups.filter(function(aItem) {
if (typeof aItem == 'string')
aItem = this.document.getElementById(aItem);
- return aItem && aItem.boxObject && ((aItem.boxObject.width || aItem.boxObject.height) && aItem.state != 'closed');
+ return (
+ aItem &&
+ aItem.getAttribute(this.kIGNORE_POPUP_STATE) != 'true' &&
+ aItem.boxObject &&
+ (aItem.boxObject.width || aItem.boxObject.height) &&
+ aItem.state != 'closed'
+ );
}, this);
return this._shownPopups.length > 0;
},