Skip to content

Commit

Permalink
Fixes to drop
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxxer committed Jan 27, 2023
1 parent 67f5797 commit 35f5ecf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 35f5ecf

Please sign in to comment.