タブバーが自動で折り畳まれた時に、タブバーが溢れた時と同じ処理が走ってしまっていたのを修正
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@3875 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
8b6f89175c
commit
d8ef4006cb
@ -1143,8 +1143,8 @@ TreeStyleTabBrowser.prototype = {
|
||||
case 'mousedown':
|
||||
if (aEvent.currentTarget == this.mTabBrowser.mTabContainer) {
|
||||
this.onTabMouseDown(aEvent);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (
|
||||
!this.tabbarResizing &&
|
||||
(
|
||||
@ -1187,7 +1187,6 @@ TreeStyleTabBrowser.prototype = {
|
||||
)
|
||||
this.hideTabbar();
|
||||
this.lastMouseDownTarget = aEvent.originalTarget.localName;
|
||||
}
|
||||
return;
|
||||
|
||||
case 'mouseup':
|
||||
@ -1258,27 +1257,11 @@ TreeStyleTabBrowser.prototype = {
|
||||
return;
|
||||
|
||||
case 'popupshowing':
|
||||
if (aEvent.target != aEvent.currentTarget) return;
|
||||
switch (aEvent.target.getAttribute('anonid'))
|
||||
{
|
||||
case 'tabContextMenu':
|
||||
this.tabContextMenuShown = true;
|
||||
this.initTabContextMenu(aEvent);
|
||||
break;
|
||||
case 'alltabs-popup':
|
||||
this.initAllTabsPopup(aEvent);
|
||||
break;
|
||||
}
|
||||
this.onPopupShowing(aEvent);
|
||||
return;
|
||||
|
||||
case 'popuphiding':
|
||||
if (aEvent.target != aEvent.currentTarget) return;
|
||||
switch (aEvent.target.getAttribute('anonid'))
|
||||
{
|
||||
case 'tabContextMenu':
|
||||
this.tabContextMenuShown = false;
|
||||
break;
|
||||
}
|
||||
this.onPopupHiding(aEvent);
|
||||
return;
|
||||
|
||||
case 'dragenter':
|
||||
@ -1311,18 +1294,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
|
||||
case 'overflow':
|
||||
case 'underflow':
|
||||
var box = aEvent.currentTarget;
|
||||
var tabs = this.mTabBrowser.mTabContainer;
|
||||
var horizontal = tabs.orient == 'horizontal';
|
||||
if (horizontal) return;
|
||||
aEvent.stopPropagation();
|
||||
if (aEvent.type == 'overflow') {
|
||||
tabs.setAttribute('overflow', 'true');
|
||||
box.scrollBoxObject.ensureElementIsVisible(tabs.selectedItem);
|
||||
}
|
||||
else {
|
||||
tabs.removeAttribute('overflow');
|
||||
}
|
||||
this.onTabbarOverflow(aEvent);
|
||||
return;
|
||||
}
|
||||
},
|
||||
@ -1800,6 +1772,38 @@ TreeStyleTabBrowser.prototype = {
|
||||
this.getTabFromEvent(aEvent).__treestyletab__preventSelect = true;
|
||||
},
|
||||
|
||||
onTabbarOverflow : function(aEvent)
|
||||
{
|
||||
var box = aEvent.currentTarget;
|
||||
var tabs = this.mTabBrowser.mTabContainer;
|
||||
var horizontal = tabs.orient == 'horizontal';
|
||||
if (horizontal) return;
|
||||
aEvent.stopPropagation();
|
||||
if (aEvent.detail == 1) return;
|
||||
if (aEvent.type == 'overflow') {
|
||||
tabs.setAttribute('overflow', 'true');
|
||||
box.scrollBoxObject.ensureElementIsVisible(tabs.selectedItem);
|
||||
}
|
||||
else {
|
||||
tabs.removeAttribute('overflow');
|
||||
}
|
||||
},
|
||||
|
||||
onPopupShowing : function(aEvent)
|
||||
{
|
||||
if (aEvent.target != aEvent.currentTarget) return;
|
||||
switch (aEvent.target.getAttribute('anonid'))
|
||||
{
|
||||
case 'tabContextMenu':
|
||||
this.tabContextMenuShown = true;
|
||||
this.initTabContextMenu(aEvent);
|
||||
break;
|
||||
case 'alltabs-popup':
|
||||
this.initAllTabsPopup(aEvent);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
initTabContextMenu : function(aEvent)
|
||||
{
|
||||
var b = this.mTabBrowser;
|
||||
@ -1981,6 +1985,17 @@ TreeStyleTabBrowser.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
onPopupHiding : function(aEvent)
|
||||
{
|
||||
if (aEvent.target != aEvent.currentTarget) return;
|
||||
switch (aEvent.target.getAttribute('anonid'))
|
||||
{
|
||||
case 'tabContextMenu':
|
||||
this.tabContextMenuShown = false;
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
/* drag and drop */
|
||||
isPlatformNotSupported : /* !this.isGecko19 && */ navigator.platform.indexOf('Mac') != -1, // see bug 136524
|
||||
isTimerSupported : /* this.isGecko19 || */ navigator.platform.indexOf('Win') == -1, // see bug 232795.
|
||||
|
Loading…
Reference in New Issue
Block a user