From 528ccd99b5896cbdfeb737522a1d13a949c81fff Mon Sep 17 00:00:00 2001 From: piro Date: Tue, 8 Sep 2009 09:59:23 +0000 Subject: [PATCH] =?UTF-8?q?Firefox=203.5=E4=BB=A5=E9=99=8D=E3=81=A7?= =?UTF-8?q?=E3=82=BF=E3=83=96=E3=83=90=E3=83=BC=E3=81=AE=E3=82=B9=E3=83=97?= =?UTF-8?q?=E3=83=AA=E3=83=83=E3=82=BF=E3=81=AEgrippy=E3=82=92=E3=82=AF?= =?UTF-8?q?=E3=83=AA=E3=83=83=E3=82=AF=E3=81=99=E3=82=8B=E3=81=A8=E6=AD=A3?= =?UTF-8?q?=E3=81=97=E3=81=8F=E3=82=BF=E3=83=96=E3=83=90=E3=83=BC=E3=81=AE?= =?UTF-8?q?=E5=B9=85=E3=83=BB=E9=AB=98=E3=81=95=E3=81=8C=E3=83=88=E3=82=B0?= =?UTF-8?q?=E3=83=AB=E3=81=97=E3=81=AA=E3=81=84=EF=BC=88=E6=8A=98=E3=82=8A?= =?UTF-8?q?=E3=81=9F=E3=81=9F=E3=81=BE=E3=82=8C=E3=81=9F=E7=8A=B6=E6=85=8B?= =?UTF-8?q?=E3=81=AE=E5=B9=85=E3=83=BB=E9=AB=98=E3=81=95=E3=82=92=E8=A8=98?= =?UTF-8?q?=E6=86=B6=E3=81=97=E3=81=A6=E3=81=97=E3=81=BE=E3=81=A3=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=9F=EF=BC=89=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5104 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 32 +++++++++++++++------ content/treestyletab/treestyletabbrowser.js | 1 + 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 57cf4cd6..7c9aea4b 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -2173,15 +2173,29 @@ catch(e) { onTabbarResized : function(aEvent) { var b = this.getTabBrowserFromChild(aEvent.currentTarget); - if (!b.treeStyleTab.isVertical) { - this.setTreePref('tabbar.height', b.mStrip.boxObject.height); - } - else { - if (!b.treeStyleTab.autoHide.expanded) - this.setTreePref('tabbar.shrunkenWidth', b.mStrip.boxObject.width); - else - this.setTreePref('tabbar.width', b.mStrip.boxObject.width); - } + window.setTimeout(function(aSelf) { + if (!b.treeStyleTab.clickedOnTabbarResizerGrippy) { + if (!b.treeStyleTab.isVertical) { + aSelf.setTreePref('tabbar.height', b.mStrip.boxObject.height); + } + else { + if (!b.treeStyleTab.autoHide.expanded) + aSelf.setTreePref('tabbar.shrunkenWidth', b.mStrip.boxObject.width); + else + aSelf.setTreePref('tabbar.width', b.mStrip.boxObject.width); + } + } + b.treeStyleTab.clickedOnTabbarResizerGrippy = false; + }, 10, this); + }, + onTabbarResizerClick : function(aEvent) + { + var b = this.getTabBrowserFromChild(aEvent.currentTarget); + b.treeStyleTab.clickedOnTabbarResizerGrippy = this.evaluateXPath( + 'ancestor-or-self::xul:grippy', + aEvent.originalTarget, + XPathResult.BOOLEAN_TYPE + ).booleanValue; }, initContextMenu : function() diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index d47b2b5b..a67521dd 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -130,6 +130,7 @@ TreeStyleTabBrowser.prototype = { splitter = document.createElement('splitter'); splitter.setAttribute('class', this.kSPLITTER); splitter.addEventListener('mousedown', this, true); + splitter.setAttribute('onclick', 'TreeStyleTabService.onTabbarResizerClick(event);'); splitter.setAttribute('onmouseup', 'TreeStyleTabService.onTabbarResized(event);'); splitter.setAttribute('state', 'open'); splitter.appendChild(document.createElement('grippy'));