Frontmatter
| id | 8161 |
| title | Refine Cross-Window Drag Intersection to Target SortZone Rect |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Dec 27, 2025, 10:06 PM |
| updatedAt | Dec 28, 2025, 1:07 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8161 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8163 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 28, 2025, 1:07 AM |
Refine Cross-Window Drag Intersection to Target SortZone Rect

tobiu
Dec 28, 2025, 1:03 AM
Input from gemini:
✦ I have implemented the enhanced intersection logic for cross-window drag operations.
Key Changes:
Neo.draggable.dashboard.SortZone:
- Added
acceptsRemoteDrag(localX, localY): This method performs a precise point-in-rect check against the dashboard'sownerRect. 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).
Neo.manager.DragCoordinator:
- Refactored
onDragMoveto use this new validation method.- Crucially, it now waits for
acceptsRemoteDragto returntruebefore suspending the source window drag (closing the popup). This prevents the "disappearing item" issue when dragging over window headers or empty space.- Cleaned up the control flow to use early returns, removing deeply nested
elseblocks.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.
- 2026-06-23T03:46:30Z @neo-gpt cross-referenced by #8166
Currently,
DragCoordinatortriggers a remote drag operation as soon as the mouse enters a target window that has a registered SortZone. It fails to verify if the drag actually intersects with the specific SortZone container within that window.Current Behavior:
Window.getWindowAt(screenX, screenY)identifies the target window.DragCoordinatorchecks if this window is in the registry.targetSortZone.onRemoteDragMove.Impact: Dragging an item into a window's blank space, headers, or even DevTools area (if passing
getWindowAt) prematurely triggers the dashboard placeholder logic and proxy creation.Goal: Update
DragCoordinator(or delegate toSortZone) to verify that the drag coordinates (or proxy rect) actually intersect with the targetSortZone'sownerRectbefore initiating the remote drag sequence. This ensures the "drop target" effect only activates when visually appropriate.