diff --git a/script.js b/script.js index 1acc288..58a0930 100644 --- a/script.js +++ b/script.js @@ -21,6 +21,7 @@ let showEditor = false; // Store the coordinates and trigger the function container.addEventListener("mousedown", (e) => { + // Avoid inserting a new label if the user is clicking on a close button) if (e.target.tagName !== "BUTTON") { startX = e.x; startY = e.y;