Minefield 3.1b2preでリンクのドラッグ&ドロップで新規タブを開けなくなっていたのを修正
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@3400 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
0e8b471eeb
commit
e10c5bca75
@ -45,6 +45,7 @@ var TreeStyleTabService = {
|
||||
kACTION_STAY : 2,
|
||||
kACTION_DUPLICATE : 4,
|
||||
kACTION_IMPORT : 8,
|
||||
kACTION_NEWTAB : 16,
|
||||
kACTION_ATTACH : 1024,
|
||||
kACTION_PART : 2048,
|
||||
kACTIONS_FOR_SOURCE : 1 | 2,
|
||||
|
@ -1951,7 +1951,12 @@ TreeStyleTabBrowser.prototype = {
|
||||
|
||||
canDrop : function(aEvent, aDragSession)
|
||||
{
|
||||
return this.getDropAction(aEvent, aDragSession).canDrop;
|
||||
var dropAction = this.getDropAction(aEvent, aDragSession);
|
||||
if ('dataTransfer' in aEvent && dropAction.action & this.kACTION_NEWTAB) {
|
||||
var dt = aEvent.dataTransfer;
|
||||
dt.effectAllowed = dt.dropEffect = 'link';
|
||||
}
|
||||
return dropAction.canDrop;
|
||||
},
|
||||
|
||||
getSupportedFlavours : function()
|
||||
@ -2035,9 +2040,11 @@ TreeStyleTabBrowser.prototype = {
|
||||
};
|
||||
|
||||
var isTabMoveFromOtherWindow = aSourceTab && aSourceTab.ownerDocument != document;
|
||||
var isNewTabAction = !aSourceTab || aSourceTab.ownerDocument != document;
|
||||
|
||||
if (tab.localName != 'tab') {
|
||||
var action = isTabMoveFromOtherWindow ? this.kACTION_STAY : (this.kACTION_MOVE | this.kACTION_PART) ;
|
||||
if (isNewTabAction) action |= this.kACTION_NEWTAB;
|
||||
if (aEvent[this.positionProp] < tabs[0].boxObject[this.positionProp]) {
|
||||
info.target = info.parent = info.insertBefore = tabs[0];
|
||||
info.position = isInverted ? this.kDROP_AFTER : this.kDROP_BEFORE ;
|
||||
@ -2133,6 +2140,8 @@ TreeStyleTabBrowser.prototype = {
|
||||
break;
|
||||
}
|
||||
|
||||
if (isNewTabAction) action |= this.kACTION_NEWTAB;
|
||||
|
||||
return info;
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user