Firefox 3.5以降でタブバーのスプリッタのgrippyをクリックすると正しくタブバーの幅・高さがトグルしない(折りたたまれた状態の幅・高さを記憶してしまっていた)問題を修正
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5104 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
963e32c913
commit
528ccd99b5
@ -2173,15 +2173,29 @@ catch(e) {
|
|||||||
onTabbarResized : function(aEvent)
|
onTabbarResized : function(aEvent)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
|
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
|
||||||
|
window.setTimeout(function(aSelf) {
|
||||||
|
if (!b.treeStyleTab.clickedOnTabbarResizerGrippy) {
|
||||||
if (!b.treeStyleTab.isVertical) {
|
if (!b.treeStyleTab.isVertical) {
|
||||||
this.setTreePref('tabbar.height', b.mStrip.boxObject.height);
|
aSelf.setTreePref('tabbar.height', b.mStrip.boxObject.height);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!b.treeStyleTab.autoHide.expanded)
|
if (!b.treeStyleTab.autoHide.expanded)
|
||||||
this.setTreePref('tabbar.shrunkenWidth', b.mStrip.boxObject.width);
|
aSelf.setTreePref('tabbar.shrunkenWidth', b.mStrip.boxObject.width);
|
||||||
else
|
else
|
||||||
this.setTreePref('tabbar.width', b.mStrip.boxObject.width);
|
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()
|
initContextMenu : function()
|
||||||
|
@ -130,6 +130,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
splitter = document.createElement('splitter');
|
splitter = document.createElement('splitter');
|
||||||
splitter.setAttribute('class', this.kSPLITTER);
|
splitter.setAttribute('class', this.kSPLITTER);
|
||||||
splitter.addEventListener('mousedown', this, true);
|
splitter.addEventListener('mousedown', this, true);
|
||||||
|
splitter.setAttribute('onclick', 'TreeStyleTabService.onTabbarResizerClick(event);');
|
||||||
splitter.setAttribute('onmouseup', 'TreeStyleTabService.onTabbarResized(event);');
|
splitter.setAttribute('onmouseup', 'TreeStyleTabService.onTabbarResized(event);');
|
||||||
splitter.setAttribute('state', 'open');
|
splitter.setAttribute('state', 'open');
|
||||||
splitter.appendChild(document.createElement('grippy'));
|
splitter.appendChild(document.createElement('grippy'));
|
||||||
|
Loading…
Reference in New Issue
Block a user