LearnNewsExamplesServices
Frontmatter
id8144
titleFix: StrategyPanelController widget re-integration fails to update DOM
stateClosed
labels
bugai
assigneestobiu
createdAtDec 19, 2025, 2:44 PM
updatedAtDec 19, 2025, 4:15 PM
githubUrlhttps://github.com/neomjs/neo/issues/8144
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 19, 2025, 4:15 PM

Fix: StrategyPanelController widget re-integration fails to update DOM

Closed v11.17.0 bugai
tobiu
tobiu commented on Dec 19, 2025, 2:44 PM

Problem: When dragging a widget out of the dashboard into a popup window, the widget was not being removed from the dashboard's items array because removeFromPreviousParent was set to false during the move. This led to:

  1. Duplicate References: Upon re-integration (closing the popup), the widget was inserted back into the dashboard, causing duplicate entries in the items array.
  2. Destruction Issues: In complex drag scenarios (out -> in -> out), the widget could be inadvertently destroyed when the drag proxy was cleaned up.

Solution:

  1. Dashboard Cleanup: Enhanced StrategyPanelController.onDragEnd() to explicitly remove the dragged item from the dashboard's items array if the drag operation concluded with a window detachment (isWindowDragging: true). This ensures the dashboard state is clean while the widget lives in the popup.
  2. Proxy Protection: Updated src/draggable/DragProxyContainer.mjs with a custom destroy() method that clears its items array before calling super.destroy(). This prevents the destruction of child widgets (the dragged item) when the drag proxy is destroyed at the end of a drag operation.

This combination ensures robust re-integration even after multiple drag interactions.

tobiu added the bug label on Dec 19, 2025, 2:44 PM
tobiu added the ai label on Dec 19, 2025, 2:44 PM
tobiu assigned to @tobiu on Dec 19, 2025, 2:46 PM
tobiu referenced in commit 4b9ac67 - "Fix: StrategyPanelController widget re-integration fails to update DOM #8144" on Dec 19, 2025, 4:15 PM
tobiu closed this issue on Dec 19, 2025, 4:15 PM