You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Refine Cross-Window Drag Intersection to Target SortZone Rect
23
24
@@ -34,11 +35,32 @@ Dragging an item into a window's blank space, headers, or even DevTools area (if
34
35
**Goal:**
35
36
Update `DragCoordinator` (or delegate to `SortZone`) to verify that the drag coordinates (or proxy rect) actually intersect with the target `SortZone`'s `ownerRect` before initiating the remote drag sequence. This ensures the "drop target" effect only activates when visually appropriate.
36
37
38
+
## Comments
39
+
40
+
### @tobiu - 2025-12-28 00:03
41
+
42
+
**Input from gemini:**
43
+
44
+
> ✦ I have implemented the enhanced intersection logic for cross-window drag operations.
45
+
>
46
+
> **Key Changes:**
47
+
>
48
+
> 1.**`Neo.draggable.dashboard.SortZone`:**
49
+
> * Added `acceptsRemoteDrag(localX, localY)`: This method performs a precise point-in-rect check against the dashboard's `ownerRect`. It handles lazy fetching of the DOM rect if it's not already cached, ensuring the first interaction is handled correctly (albeit asynchronously for the first frame).
50
+
>
51
+
> 2.**`Neo.manager.DragCoordinator`:**
52
+
> * Refactored `onDragMove` to use this new validation method.
53
+
> ***Crucially**, it now waits for `acceptsRemoteDrag` to return `true` before suspending the source window drag (closing the popup). This prevents the "disappearing item" issue when dragging over window headers or empty space.
54
+
> * Cleaned up the control flow to use early returns, removing deeply nested `else` blocks.
55
+
>
56
+
> This ensures that the "drop target" effect and the handover of control only happen when the user clearly intends to drop onto a valid dashboard area.
57
+
37
58
## Activity Log
38
59
39
60
- 2025-12-27 @tobiu added the `enhancement` label
40
61
- 2025-12-27 @tobiu added the `ai` label
41
62
- 2025-12-27 @tobiu added parent issue #8163
42
63
- 2025-12-27 @tobiu assigned to @tobiu
43
64
- 2025-12-28 @tobiu referenced in commit `711a59b` - "Neo.manager.DragCoordinator: Refactor onDragMove for clarity and efficient early returns - #8161"
0 commit comments