Minefield 4.0b2preでタブバーの上でコンテキストメニューを開けない問題に対処
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6799 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
c112f5754f
commit
10555d3140
@ -291,6 +291,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
strip.addEventListener('dragend', this, false);
|
||||
strip.addEventListener('dragover', this, false);
|
||||
strip.addEventListener('drop', this, false);
|
||||
strip.addEventListener('MozMouseHittest', this, true); // to block default behaviors of the tab bar
|
||||
strip.addEventListener('mousedown', this, true);
|
||||
strip.addEventListener('mouseup', this, false);
|
||||
strip.addEventListener('click', this, true);
|
||||
@ -1520,6 +1521,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
strip.removeEventListener('dragend', this, false);
|
||||
strip.removeEventListener('dragover', this, false);
|
||||
strip.removeEventListener('drop', this, false);
|
||||
strip.removeEventListener('MozMouseHittest', this, true);
|
||||
strip.removeEventListener('mousedown', this, true);
|
||||
strip.removeEventListener('mouseup', this, false);
|
||||
strip.removeEventListener('click', this, true);
|
||||
@ -1827,6 +1829,9 @@ TreeStyleTabBrowser.prototype = {
|
||||
case 'dblclick':
|
||||
return this.onDblClick(aEvent);
|
||||
|
||||
case 'MozMouseHittest': // to block default behaviors of the tab bar
|
||||
return this.onMozMouseHittest(aEvent);
|
||||
|
||||
case 'mousedown':
|
||||
return this.onMouseDown(aEvent);
|
||||
|
||||
@ -2909,6 +2914,22 @@ TreeStyleTabBrowser.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
onMozMouseHittest : function TSTBrowser_onMozMouseHittest(aEvent)
|
||||
{
|
||||
// block default behaviors of the tab bar (dragging => window move, etc.)
|
||||
if (
|
||||
'TabsOnTop' in window &&
|
||||
(
|
||||
this.currentTabbarPosition != 'top' ||
|
||||
!TabsOnTop.enabled ||
|
||||
aEvent.shiftKey
|
||||
) &&
|
||||
this.tabbarDNDObserver.canDragTabbar(aEvent)
|
||||
) {
|
||||
aEvent.stopPropagation();
|
||||
}
|
||||
},
|
||||
|
||||
onMouseDown : function TSTBrowser_onMouseDown(aEvent)
|
||||
{
|
||||
if (
|
||||
@ -2917,16 +2938,8 @@ TreeStyleTabBrowser.prototype = {
|
||||
) {
|
||||
this.getTabFromEvent(aEvent).__treestyletab__preventSelect = true;
|
||||
}
|
||||
else if (
|
||||
'TabsOnTop' in window &&
|
||||
!this.getTabFromEvent(aEvent) &&
|
||||
(
|
||||
this.currentTabbarPosition != 'top' ||
|
||||
!TabsOnTop.enabled
|
||||
) &&
|
||||
this.tabbarDNDObserver.canDragTabbar(aEvent)
|
||||
) {
|
||||
aEvent.stopPropagation();
|
||||
else {
|
||||
this.onMozMouseHittest(aEvent);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user