From 35f5ecfc8a41ea9820d4f3361561c9eceae95de4 Mon Sep 17 00:00:00 2001 From: Haxxer Date: Fri, 27 Jan 2023 08:36:34 +0000 Subject: [PATCH] Fixes to drop --- scripts/module.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/module.js b/scripts/module.js index b6f5df3..67ca8ef 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -600,17 +600,18 @@ class TagManager { div.classList.add('dropping'); } div.ondragleave = (evt) => { - if(!evt.target.className.includes("tag")) return; + if(evt.target.className.includes("tag-drop-ignore")) return; this.dropIndex = null; div.classList.remove('dropping'); } const span = document.createElement("span"); + span.setAttribute("class", "tag-drop-ignore"); span.innerHTML = tag; - span.onclick = () => this.editTagClicked(index); + span.onclick = () => this.editTagClicked(index); const closeButton = document.createElement("i"); - closeButton.setAttribute("class", "fas fa-times"); + closeButton.setAttribute("class", "fas fa-times tag-drop-ignore"); closeButton.onclick = () => this.removeButtonClicked(index); div.appendChild(span);