commit 3b5bd454336c64ac5878620a7fac33578161822e
parent 717a440156fa117d6eb0db0a31487a010f73c0ec
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 20 Jul 2014 13:16:56 -0400
Further Windows drag-and-drop comment rewriting
Diffstat:
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/chrome/content/zotero/xpcom/libraryTreeView.js b/chrome/content/zotero/xpcom/libraryTreeView.js
@@ -194,25 +194,25 @@ Zotero.LibraryTreeView.prototype = {
_setDropEffect: function (event, effect) {
- // On Windows (in Fx26), Firefox uses 'move' for unmodified drags,
- // and 'copy'/'link' for drags with system-default modifier keys,
+ // On Windows (in Fx26), Firefox uses 'move' for unmodified drags
+ // and 'copy'/'link' for drags with system-default modifier keys
// as long as the actions are allowed by the initial effectAllowed set
// in onDragStart, regardless of the effectAllowed or dropEffect set
// in onDragOver. It doesn't seem to be possible to use 'copy' for
// the default and 'move' for modified, as we need to in the collections
- // tree. To prevent inaccurate 'copy'/'link' cursors, we set effectAllowed
- // to 'copy' in onDragStart, which locks the cursor at 'copy'. ('none' still
- // changes the cursor, but 'move'/'link' do not.) We use 'copy' instead of
- // 'move' because with 'move' text can't be dragged to Chrome textareas
- // (and probably other places), and that seems worse than always showing
- // 'copy' feedback.
+ // tree. To prevent inaccurate cursor feedback, we set effectAllowed to
+ // 'copy' in onDragStart, which locks the cursor at 'copy'. ('none' still
+ // changes the cursor, but 'move'/'link' do not.) It'd be better to use
+ // the unadorned 'move', but we use 'copy' instead because with 'move' text
+ // can't be dragged to some external programs (e.g., Chrome, Notepad++),
+ // which seems worse than always showing 'copy' feedback.
//
// However, since effectAllowed is enforced, leaving it at 'copy'
- // would prevent our modified 'move' from working, so we also have to
- // set effectAllowed here (called from onDragOver) to the same action
- // 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.
+ // would prevent our modified 'move' in the collections tree from working,
+ // so we also have to set effectAllowed here (called from onDragOver) to
+ // the same action 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.
if (Zotero.isWin) {
event.dataTransfer.effectAllowed = effect;
}