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'.
This commit is contained in:
Dan Stillman 2014-07-20 02:11:11 -04:00
parent 7d74344b7d
commit b8f69d6281
2 changed files with 6 additions and 1 deletions

View file

@ -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();

View file

@ -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;
}