Mouse Capture: Drag Between Containers

Drag circles from SOURCE to TARGET on both sides

🎯 Try This:

LEFT (Broken): Drag the circles toward TARGET. As soon as your cursor leaves the SOURCE box, dragging stops and the circle snaps back. This happens because the SOURCE component only receives mouse events while the pointer is inside its bounds — once you leave, it no longer gets the mouse-up event and the drag is effectively canceled.

RIGHT (Works): Drag the circles toward TARGET. Dragging continues even when your cursor leaves SOURCE. This version calls setCapture(), which forces all mouse events to keep going to the SOURCE component until release, so the drop completes correctly.

❌ Without Capture
Drag breaks when leaving SOURCE
SOURCE
{{item.id}}
⚪ Ready 🔴 Dragging - will snap back!
TARGET
{{item.id}}
✅ With Capture
Drag works perfectly
SOURCE
{{item.id}}
⚪ Ready 🟢 Dragging - tracking!
TARGET
{{item.id}}