mirror of
https://github.com/zotero/zotero.git
synced 2026-10-08 03:08:19 +00:00
Further Windows drag-and-drop comment rewriting
This commit is contained in:
parent
717a440156
commit
3b5bd45433
1 changed files with 13 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue