You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Events are replayed on already destroyed components #59841
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
In an SSR Angular app with withEventReplay() enabled and a lot of elements to hydrate, components can be interacted with before hydration ends.
In that case, if a component is destroyed by a click happening on it (because it triggers a router navigation for example) before hydration completes, the click event on that element will be replayed even though the element is already destroyed.
This behavior makes the app throw errors like NG0953 if the click listener emits to an output for example.
Please provide a link to a minimal reproduction of the bug
In the repro app, you need to click on the square to make it disappear, the error NG0953 should happen at the end of the artificial 2s delay, when hydration ends.
Activity
fix(core): prevent invoking replay listeners on disconnected nodes
fix(core): prevent invoking replay listeners on disconnected nodes (#…
fix(core): prevent invoking replay listeners on disconnected nodes (a…
angular-automatic-lock-bot commentedon Mar 30, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.