タブバーが自動で折り畳まれた時に、タブバーが溢れた時と同じ処理が走ってしまっていたのを修正
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':
|
case 'mousedown':
|
||||||
if (aEvent.currentTarget == this.mTabBrowser.mTabContainer) {
|
if (aEvent.currentTarget == this.mTabBrowser.mTabContainer) {
|
||||||
this.onTabMouseDown(aEvent);
|
this.onTabMouseDown(aEvent);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if (
|
if (
|
||||||
!this.tabbarResizing &&
|
!this.tabbarResizing &&
|
||||||
(
|
(
|
||||||
@ -1187,7 +1187,6 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
)
|
)
|
||||||
this.hideTabbar();
|
this.hideTabbar();
|
||||||
this.lastMouseDownTarget = aEvent.originalTarget.localName;
|
this.lastMouseDownTarget = aEvent.originalTarget.localName;
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 'mouseup':
|
case 'mouseup':
|
||||||
@ -1258,27 +1257,11 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case 'popupshowing':
|
case 'popupshowing':
|
||||||
if (aEvent.target != aEvent.currentTarget) return;
|
this.onPopupShowing(aEvent);
|
||||||
switch (aEvent.target.getAttribute('anonid'))
|
|
||||||
{
|
|
||||||
case 'tabContextMenu':
|
|
||||||
this.tabContextMenuShown = true;
|
|
||||||
this.initTabContextMenu(aEvent);
|
|
||||||
break;
|
|
||||||
case 'alltabs-popup':
|
|
||||||
this.initAllTabsPopup(aEvent);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 'popuphiding':
|
case 'popuphiding':
|
||||||
if (aEvent.target != aEvent.currentTarget) return;
|
this.onPopupHiding(aEvent);
|
||||||
switch (aEvent.target.getAttribute('anonid'))
|
|
||||||
{
|
|
||||||
case 'tabContextMenu':
|
|
||||||
this.tabContextMenuShown = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 'dragenter':
|
case 'dragenter':
|
||||||
@ -1311,18 +1294,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
case 'overflow':
|
case 'overflow':
|
||||||
case 'underflow':
|
case 'underflow':
|
||||||
var box = aEvent.currentTarget;
|
this.onTabbarOverflow(aEvent);
|
||||||
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');
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1800,6 +1772,38 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.getTabFromEvent(aEvent).__treestyletab__preventSelect = true;
|
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)
|
initTabContextMenu : function(aEvent)
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
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 */
|
/* drag and drop */
|
||||||
isPlatformNotSupported : /* !this.isGecko19 && */ navigator.platform.indexOf('Mac') != -1, // see bug 136524
|
isPlatformNotSupported : /* !this.isGecko19 && */ navigator.platform.indexOf('Mac') != -1, // see bug 136524
|
||||||
isTimerSupported : /* this.isGecko19 || */ navigator.platform.indexOf('Win') == -1, // see bug 232795.
|
isTimerSupported : /* this.isGecko19 || */ navigator.platform.indexOf('Win') == -1, // see bug 232795.
|
||||||
|
Loading…
Reference in New Issue
Block a user