Drag interactions break when the pointer leaves the canvas #7

Closed
opened 2026-08-11 12:20:37 +00:00 by Mark · 0 comments
Owner

In src/components/editor/FloorplanCanvas.tsx, mousemove/mouseup are only handled on the element, so if the pointer leaves the canvas mid-drag (rect draw, move, or resize), the preview freezes and releasing the button does nothing; dragState stays active until the next mousedown. Attach window-level mousemove/mouseup listeners while a drag is active so the interaction completes even when the pointer leaves the SVG.

In src/components/editor/FloorplanCanvas.tsx, mousemove/mouseup are only handled on the <svg> element, so if the pointer leaves the canvas mid-drag (rect draw, move, or resize), the preview freezes and releasing the button does nothing; dragState stays active until the next mousedown. Attach window-level mousemove/mouseup listeners while a drag is active so the interaction completes even when the pointer leaves the SVG.
Mark 2026-08-14 03:57:23 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/kimi_agent_home_assistant#7
No description provided.