a97d05412e
- Move trash button drop listener out of setupDrag() to an IIFE so it only registers once (was accumulating listeners on every render() call, causing multiple toast messages on single drop). - Fix rectangle selection mousedown handler: use optional chaining on closest() for safety with text nodes; avoid calling render() inside mousedown (which would detach the event target's children mid-handler) and instead just remove .selected class directly from the DOM.