diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 97c0b0ef..724ea0d0 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -2928,8 +2928,7 @@ TreeStyleTabBrowser.prototype = { info.canDrop = true; info.source = tab; if (tab) { - var isCopy = this.isAccelKeyPressed(aEvent) || - (aEvent.dataTransfer && aEvent.dataTransfer.dropEffect == 'copy'); + var isCopy = this.isCopyAction(aEvent); if (isCopy && 'duplicateTab' in this.mTabBrowser) { info.action |= this.kACTION_DUPLICATE; } diff --git a/content/treestyletab/treestyletabbrowser_tabbarDNDObserver.js b/content/treestyletab/treestyletabbrowser_tabbarDNDObserver.js index 81162d48..cbf15ca7 100644 --- a/content/treestyletab/treestyletabbrowser_tabbarDNDObserver.js +++ b/content/treestyletab/treestyletabbrowser_tabbarDNDObserver.js @@ -183,7 +183,7 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = { if (dropAction.action & this.kACTION_NEWTAB) { dt.effectAllowed = dt.dropEffect = ( !dropAction.source ? 'link' : - sv.isAccelKeyPressed(aEvent) ? 'copy' : + sv.isCopyAction(aEvent) ? 'copy' : 'move' ); } diff --git a/modules/utils.js b/modules/utils.js index fc65eb8b..5d7457e6 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -451,6 +451,12 @@ var TreeStyleTabUtils = { (aEvent.ctrlKey || (aEvent.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_CONTROL)) ; }, + isCopyAction : function TSTUtils_isCopyAction(aEvent) + { + return this.isAccelKeyPressed(aEvent) || + (aEvent.dataTransfer && aEvent.dataTransfer.dropEffect == 'copy'); + }, + isEventFiredOnClosebox : function TSTUtils_isEventFiredOnClosebox(aEvent) { return this.evaluateXPath(