Frontmatter
| id | 9281 |
| title | DomEvents: Prevent duplicate local DOM event listeners |
| state | Closed |
| labels | bugaicore |
| assignees | tobiu |
| createdAt | Feb 24, 2026, 2:44 AM |
| updatedAt | Feb 24, 2026, 2:45 AM |
| githubUrl | https://github.com/neomjs/neo/issues/9281 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 24, 2026, 2:45 AM |
DomEvents: Prevent duplicate local DOM event listeners

tobiu
Feb 24, 2026, 2:45 AM
The fix has been implemented and pushed to the dev branch.
When calling
addDomListeners()on a component that is already mounted, themountDomListenersroutine would re-send all existing local events (likemousemove) to the Main thread, resulting in duplicateaddEventListenerbindings and doubledpostMessagetraffic.Root Cause:
mountDomListenerswas iterating over all registered listeners for a component and adding them to the payload sent to the App Worker, without checking if they had already been mounted.Resolution:
mountDomListenersinsrc/manager/DomEvent.mjsto check!event.mountedfor local events, and setevent.mounted = truebefore sending.resetMountedDomListeners()toDomEventmanager to reset the flag when a component unmounts.resetMountedDomEvents()tosrc/mixin/DomEvents.mjs.me.resetMountedDomEvents?.()insrc/component/Abstract.mjswhenafterSetMountedisfalse(unmounting). This ensures listeners are only sent once and correctly re-attached if the component remounts.