From cb68be7a1bbb0b1eeb6d96f11605a02bc0ea5ff6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 1 May 2018 13:24:08 +1000 Subject: [PATCH] Revert "Revert "workaround for some drags not being accepted"" This reverts commit e7046ba3981e0bdbc96540a51f563767113d8cc8. Without this change, dragging images from Google searches doesn't work on the latest Chrome (tested on macOS). --- web/editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/editor.js b/web/editor.js index 41ecea077..492a79311 100644 --- a/web/editor.js +++ b/web/editor.js @@ -167,6 +167,9 @@ function focusPrevious() { } function onDragOver(elem) { + var e = window.event; + e.dataTransfer.dropEffect = "copy"; + e.preventDefault(); // if we focus the target element immediately, the drag&drop turns into a // copy, so note it down for later instead dropTarget = elem;