commit b8f69d628167b31f851da8b88e303d2c60d824d5
parent 7d74344b7d1e73ba990921ac3f0a69db706ebf2c
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 20 Jul 2014 02:11:11 -0400
Fix Quick Copy drag to Chrome textareas on Windows
Possibly to other places as well (but not Notepad, which doesn't work
from Firefox or Chrome either)
Unfortunately this requires going back to 'copy' cursor feedback when
dragging, even when Shift is used. We can only choose one on Windows (as
far as I can tell), and we were previously using the unadorned 'move'.
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js
@@ -2558,7 +2558,7 @@ Zotero.ItemTreeCommandController.prototype.onEvent = function(evt)
Zotero.ItemTreeView.prototype.onDragStart = function (event) {
// See note in LibraryTreeView::_setDropEffect()
if (Zotero.isWin) {
- event.dataTransfer.effectAllowed = 'move';
+ event.dataTransfer.effectAllowed = 'copy';
}
var itemIDs = this.saveSelection();
diff --git a/chrome/content/zotero/xpcom/libraryTreeView.js b/chrome/content/zotero/xpcom/libraryTreeView.js
@@ -208,6 +208,11 @@ Zotero.LibraryTreeView.prototype = {
// as the dropEffect. This allows the dropEffect setting (which we use
// in the tree's canDrop() and drop() to determine the desired action)
// to be changed, even if the cursor doesn't reflect the new setting.
+ //
+ // Update (07/2014): We now use 'copy' for effectAllowed on Windows in
+ // onDragStart, since with 'move' text can't be dragged to Chrome
+ // textareas (and probably other places). This locks the cursor at copy,
+ // even when Shift is used, but that seems less bad.
if (Zotero.isWin) {
event.dataTransfer.effectAllowed = effect;
}