diff --git a/content/treestyletab/treestyletab.css b/content/treestyletab/treestyletab.css index be2face9..8d484c08 100644 --- a/content/treestyletab/treestyletab.css +++ b/content/treestyletab/treestyletab.css @@ -154,7 +154,7 @@ image.tab-icon { .tabbrowser-tabs[treestyletab-animation-enabled="true"][treestyletab-mode="vertical"]:not([treestyletab-tab-inverted="true"]) - .tabbrowser-tab { + .tabbrowser-tab:not([treestyletab-collapsed-done="true"]) { -moz-transition: margin-top 0.15s ease-out, opacity 0.15s ease-out, margin-left 0.2s ease-out; @@ -164,7 +164,7 @@ image.tab-icon { } .tabbrowser-tabs[treestyletab-animation-enabled="true"][treestyletab-mode="vertical"][treestyletab-tab-inverted="true"] - .tabbrowser-tab { + .tabbrowser-tab:not([treestyletab-collapsed-done="true"]) { -moz-transition: margin-top 0.15s ease-out, opacity 0.15s ease-out, margin-right 0.2s ease-out; @@ -174,7 +174,7 @@ image.tab-icon { } .tabbrowser-tabs[treestyletab-animation-enabled="true"]:not([treestyletab-mode="vertical"]):not([treestyletab-tab-inverted="true"]) - .tabbrowser-tab { + .tabbrowser-tab:not([treestyletab-collapsed-done="true"]) { -moz-transition: margin-left 0.15s ease-out, opacity 0.15s ease-out, margin-top 0.2s ease-out; @@ -184,7 +184,7 @@ image.tab-icon { } .tabbrowser-tabs[treestyletab-animation-enabled="true"]:not([treestyletab-mode="vertical"])[treestyletab-tab-inverted="true"] - .tabbrowser-tab { + .tabbrowser-tab:not([treestyletab-collapsed-done="true"]) { -moz-transition: margin-left 0.15s ease-out, opacity 0.15s ease-out, margin-bottom 0.2s ease-out; diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 02262374..ce116c37 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -3982,6 +3982,11 @@ TreeStyleTabBrowser.prototype = { // !this.isVertical || !this.canCollapseSubtree() ) { + if (aCollapsed) + aTab.setAttribute(this.kCOLLAPSED_DONE, true); + else + aTab.removeAttribute(this.kCOLLAPSED_DONE); + aTab.setAttribute( 'style', aTab.getAttribute('style') @@ -3994,10 +3999,6 @@ TreeStyleTabBrowser.prototype = { ) : '' ) ); - if (aCollapsed) - aTab.setAttribute(this.kCOLLAPSED_DONE, true); - else - aTab.removeAttribute(this.kCOLLAPSED_DONE); return; }