diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 1c6e521d..986856c4 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -1918,10 +1918,13 @@ catch(e) { removeTabSubtree : function TSTService_removeTabSubtree(aTabOrTabs, aOnlyChildren) { - var tabs = this.gatherSubtreeMemberTabs(aTabOrTabs); + var tabs = this.gatherSubtreeMemberTabs(aTabOrTabs, aOnlyChildren); if (!this.warnAboutClosingTabs(tabs.length)) return; + if (aOnlyChildren) + tabs = this.gatherSubtreeMemberTabs(aTabOrTabs); + this.splitTabsToSubtrees(tabs).forEach(function(aTabs) { if (!this.fireTabSubtreeClosingEvent(aTabs[0], aTabs)) return;