From 4b16210ac6449f07c3ccd06a2e540fd701d34406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Wed, 18 Nov 2015 18:05:57 +0000 Subject: [PATCH] Remove tags on shift-drag Closes #852 Currently shows a *+* icon for adding a tag and a *link* icon for removing it. There does not appear to be any way to have a custom mouse cursor, which makes this interaction extremely unintuitive. It might be possible to hack this in, but it does not really warrant the effort. E.g. `window.setCursor` does not respond whilst dragging. --- chrome/content/zotero/bindings/tagselector.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml index ac5c0f304..7c355e6f1 100644 --- a/chrome/content/zotero/bindings/tagselector.xml +++ b/chrome/content/zotero/bindings/tagselector.xml @@ -934,13 +934,16 @@ } } */ - + + // Store the event, because drop event does not have shiftKey attribute set + Zotero.DragDrop.currentEvent = event; event.target.setAttribute('draggedOver', true); event.preventDefault(); - event.effectAllowed = event.dropEffect = "link"; + event.dataTransfer.dropEffect = "copy"; } this.onDragExit = function (event) { + Zotero.DragDrop.currentEvent = null; event.target.setAttribute('draggedOver', false); } @@ -962,7 +965,11 @@ for (let i=0; i