diff --git a/js/components/DropTarget.js b/js/components/DropTarget.js index 200f9015..5b732d7b 100644 --- a/js/components/DropTarget.js +++ b/js/components/DropTarget.js @@ -10,8 +10,8 @@ export default class DropTarget extends React.Component { supress(e) { e.stopPropagation(); e.preventDefault(); - e.dataTransfer.dropEffect = "copy"; - e.dataTransfer.effectAllowed = "copyMove"; + e.dataTransfer.dropEffect = "link"; + e.dataTransfer.effectAllowed = "link"; } handleDrop(e) { diff --git a/js/index.js b/js/index.js index 5934a83b..4cf7806a 100644 --- a/js/index.js +++ b/js/index.js @@ -36,6 +36,16 @@ const NOISY_ACTION_TYPES = new Set([ SET_BAND_VALUE ]); +function supressDragAndDrop(e) { + e.preventDefault(); + e.dataTransfer.effectAllowed = "none"; + e.dataTransfer.dropEffect = "none"; +} + +window.addEventListener("dragenter", supressDragAndDrop); +window.addEventListener("dragover", supressDragAndDrop); +window.addEventListener("drop", supressDragAndDrop); + let lastActionType = null; // Filter out consecutive common actions