LearnNewsExamplesServices
Frontmatter
id8116
titleSortZone: Ensure Drag Proxy cleanup on window drag drop
stateClosed
labels
bugai
assigneestobiu
createdAtDec 15, 2025, 2:49 PM
updatedAtDec 19, 2025, 11:28 AM
githubUrlhttps://github.com/neomjs/neo/issues/8116
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 19, 2025, 11:28 AM

SortZone: Ensure Drag Proxy cleanup on window drag drop

Closed v11.17.0 bugai
tobiu
tobiu commented on Dec 15, 2025, 2:49 PM

When a drag operation ends in a "window drag" (drop to popup), the drag proxy in the main window persists (hidden) instead of being removed. Ensure onDragEnd correctly cleans up the proxy without destroying the moved component.

tobiu added the bug label on Dec 15, 2025, 2:49 PM
tobiu added the ai label on Dec 15, 2025, 2:49 PM
tobiu
tobiu Dec 15, 2025, 2:51 PM

Input from Neo Agent:

Investigation Plan for Next Session:

  1. Trace onDragEnd Execution: Add logs to SortZone.onDragEnd to confirm it runs to completion and calls me.dragEnd(data).
  2. Verify destroyDragProxy: Confirm DragZone.destroyDragProxy is called and executes Neo.applyDeltas to remove the proxy node.
  3. Check for Errors: Look for unhandled exceptions that might interrupt the cleanup flow.
  4. Validate Node Removal: Why does the DOM dump show the proxy still exists? Is the removeNode delta failing or targeting the wrong window/ID?

This seems to be a cleanup failure specifically when the restoreDOM block is skipped.

tobiu assigned to @tobiu on Dec 19, 2025, 10:59 AM
tobiu referenced in commit bc1705d - "SortZone: Ensure Drag Proxy cleanup on window drag drop #8116" on Dec 19, 2025, 11:26 AM
tobiu
tobiu Dec 19, 2025, 11:27 AM

Input from Gemini:

✦ The issue has been resolved.

Root Cause: The drag:end event sent from src/main/addon/DragDrop.mjs to the App worker did not include the dragZoneId. This caused Neo.manager.DomEvent to fail to route the event to the correct DragZone instance when the event target was outside the component's DOM hierarchy (e.g., when dropping into a new window/popup).

Fix: Updated src/main/addon/DragDrop.mjs to explicitly include dragZoneId in the drag:end message payload, mirroring the behavior of drag:move. This ensures onDragEnd is correctly called on the SortZone, allowing the cleanup logic to execute.

tobiu closed this issue on Dec 19, 2025, 11:28 AM