From 141e8194983122b25021f340680b58fb6b701d52 Mon Sep 17 00:00:00 2001 From: Piro / SHIMODA Hiroshi Date: Mon, 10 Jan 2011 12:27:02 +0900 Subject: [PATCH] [autohide] When the window is resized while the tab bar is expanded, hide it before updating width of the bar. (fix for https://github.com/piroor/treestyletab/issues#issue/18 ) --- content/treestyletab/treestyletabbrowser.js | 3 +++ modules/utils.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index d200c0e5..709393c2 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1243,6 +1243,9 @@ TreeStyleTabBrowser.prototype = { this.mTabBrowser.getAttribute(this.kFIXED) != 'true') { strip.setAttribute('layer', true); // https://bugzilla.mozilla.org/show_bug.cgi?id=590468 + if (this.autoHide.expanded && (aReason & this.kTABBAR_UPDATE_SYNC_TO_PLACEHOLDER)) + this.autoHide.hide(); + let box = this._tabStripPlaceHolder.boxObject; let root = document.documentElement.boxObject; diff --git a/modules/utils.js b/modules/utils.js index 33eeb6ed..43dd8f07 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -188,7 +188,7 @@ var TreeStyleTabUtils = { kTABBAR_UPDATE_BY_PRIVATE_BROWSING : (1 << 8), kTABBAR_UPDATE_BY_AUTOHIDE : (1 << 9), kTABBAR_UPDATE_BY_INITIALIZE : (1 << 10), - kTABBAR_UPDATE_NOW : (1 << 5) | (1 << 9) | (1 << 10), + kTABBAR_UPDATE_NOW : (1 << 5) | (1 << 6) | (1 << 9) | (1 << 10), kTABBAR_UPDATE_SYNC_TO_TABBAR : (1 << 0) | (1 << 1) | (1 << 2) | (1 << 5) | (1 << 8) | (1 << 9), kTABBAR_UPDATE_SYNC_TO_PLACEHOLDER : (1 << 3) | (1 << 4) | (1 << 6) | (1 << 7) | (1 << 10),