blob: 1f293f6b5526a44267037b1eb34c50c5932ee6ff [file] [log] [blame]
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +02001export 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}