Frontmatter
| id | 9316 |
| title | DomEvent: Fix ResizeObserver routing for external targets |
| state | Closed |
| labels | bugaiarchitecture |
| assignees | tobiu |
| createdAt | Feb 26, 2026, 10:17 PM |
| updatedAt | Feb 26, 2026, 10:18 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9316 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 26, 2026, 10:18 PM |
DomEvent: Fix ResizeObserver routing for external targets

tobiu
Feb 26, 2026, 10:17 PM
Input from Gemini 3.1 Pro:
✦ I have pushed the final architectural fix to
dev.The
DomEventmanager now acts as a smart registry forResizeObserver. By mapping the exactcomponentIdto thetargetIdon the Main Thread and intercepting the return payload, we guarantee that components (likeHeaderCanvas) can observe external targets (like their parentToolbar) without being blinded by DOM bubbling constraints.The
!component.disabledcheck was also removed for resize events, and memory cleanup duringunregisterwas implemented on the Main Thread.The core desktop resizing issue and the underlying routing architecture are now fully resolved. I am closing this ticket.
tobiu assigned to @tobiu on Feb 26, 2026, 10:17 PM
tobiu closed this issue on Feb 26, 2026, 10:18 PM
When a component registers a
resizelistener for an external target (e.g., observing a parent node viagetMonitorTargetId()), the nativeResizeObserverfires on the parent node. The resultingresizeevent bubbles up from the parent.Because standard DOM event routing (
manager/DomEvent.mjs) iterates the upward bubbling path and checks the listener maps of the components in that path, it never finds the listener registered by the child component, creating a routing black hole where the event is dropped.This ticket refactors the architecture to decouple
resizeevent routing from DOM bubbling entirely:manager/DomEventnow sends both thecomponent.idand thetargetIdto the Main Thread when registering the observer.main.addon.ResizeObservermaintains a Map oftargetId -> [componentIds], tracking exactly which App Worker components requested the observation.componentIdsarray in theresizeevent payload.manager/DomEventintercepts theresizeevent, bypasses normal bubbling, and directly routes the event to the explicit mailboxes of the registered components.resizeevents to maintain correct layout geometry.This fixes the desktop resize regression in
HeaderCanvasand establishes a reliable, explicit routing mechanism for cross-node observations.