From 1a3708c49dca4479429f1ca98cca4f3ad4c601f9 Mon Sep 17 00:00:00 2001 From: David Back Date: Thu, 6 Dec 2018 16:14:28 -0800 Subject: [PATCH] better drag drop fix --- scripts/system/html/js/utils.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/system/html/js/utils.js b/scripts/system/html/js/utils.js index fe96e8b79e..d61b4d1762 100644 --- a/scripts/system/html/js/utils.js +++ b/scripts/system/html/js/utils.js @@ -11,13 +11,17 @@ function disableDragDrop() { document.addEventListener("drop", function(event) { event.preventDefault(); - event.dataTransfer.effectAllowed = "none"; - event.dataTransfer.dropEffect = "none"; - }, false); + }); document.addEventListener("dragover", function(event) { - event.preventDefault(); event.dataTransfer.effectAllowed = "none"; event.dataTransfer.dropEffect = "none"; + event.preventDefault(); + }); + + document.addEventListener("dragenter", function(event) { + event.dataTransfer.effectAllowed = "none"; + event.dataTransfer.dropEffect = "none"; + event.preventDefault(); }, false); }