diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 6c9f782b..576af9a1 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -1196,23 +1196,21 @@ catch(e) { this.setTabValue(tab, this.kCHILDREN, backupChildren); } - if (!nextFocusedTab) { - if (parentTab) { - var firstSibling = this.getFirstChildTab(parentTab); - var lastSibling = this.getLastChildTab(parentTab); - if (tab == lastSibling) { - if (tab == firstSibling) { // there is only one child - nextFocusedTab = parentTab; - } - else { // previous sibling tab - nextFocusedTab = this.getPreviousSiblingTab(tab); - } + if (parentTab) { + var firstSibling = this.getFirstChildTab(parentTab); + var lastSibling = this.getLastChildTab(parentTab); + if (tab == lastSibling) { + if (tab == firstSibling) { // there is only one child + nextFocusedTab = parentTab; + } + else { // previous sibling tab + nextFocusedTab = this.getPreviousSiblingTab(tab); } - this.partTab(tab, true); - } - else { - nextFocusedTab = this.getNextSiblingTab(tab); } + this.partTab(tab, true); + } + if (!nextFocusedTab) { + nextFocusedTab = this.getNextSiblingTab(tab); } if (nextFocusedTab && b.selectedTab == tab) diff --git a/install.rdf b/install.rdf index bde9270d..9b79c0bd 100644 --- a/install.rdf +++ b/install.rdf @@ -5,7 +5,7 @@