Adrià Vilanova MartÃnez | 3465e77 | 2021-07-11 19:18:41 +0200 | [diff] [blame] | 1 | export function applyDragAndDropFix(node) { |
2 | console.debug('Adding link drag&drop fix to ', node); | ||||
3 | node.addEventListener('drop', e => { | ||||
4 | if (e.dataTransfer.types.includes('text/uri-list')) { | ||||
5 | e.stopImmediatePropagation(); | ||||
6 | console.debug('Stopping link drop event propagation.'); | ||||
7 | } | ||||
8 | }, true); | ||||
9 | } |