Skip to content

fix(core): prevent element duplication with dynamic components#66809

Merged
leonsenft merged 1 commit intoangular:mainfrom
thePunderWoman:leave-duplication
Jan 29, 2026
Merged

fix(core): prevent element duplication with dynamic components#66809
leonsenft merged 1 commit intoangular:mainfrom
thePunderWoman:leave-duplication

Conversation

@thePunderWoman
Copy link
Copy Markdown
Contributor

When dynamic components are rapidly added and removed with animate.leave and animate.enter, a leave animation might fire before the enter animation could, causing an element to be retained. This fix prevents that from occuring by clearing the enter animations in this case.

fixes: #66794

@thePunderWoman thePunderWoman added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release labels Jan 28, 2026
@ngbot ngbot bot added this to the Backlog milestone Jan 28, 2026
When dynamic components are rapidly added and removed with animate.leave and animate.enter, a leave animation might fire before the enter animation could, causing an element to be retained. This fix prevents that from occuring by clearing the enter animations in this case.

fixes: angular#66794
@thePunderWoman thePunderWoman added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 29, 2026
@leonsenft leonsenft merged commit c66a19f into angular:main Jan 29, 2026
20 checks passed
@leonsenft
Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

@angular-automatic-lock-bot
Copy link
Copy Markdown

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic component + animate.leave leaves orphaned DOM nodes

3 participants