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
BUG: animate.leave doesn't save styles till the end of the transition #64326
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
When using animate.leave, styles are not preserved until the end of the animation.
In the example above, clicking the "Toggle" button should trigger the component's closing animation (using grid-template-rows). The animation plays, but the element expands in size. This is likely not the expected behavior
Please provide a link to a minimal reproduction of the bug
changed the title [-]BUG: animate.leave doesn't save styles till end of transition[/-][+]BUG: animate.leave doesn't save styles till the end of the transition[/+]on Oct 9, 2025
This is definitely odd. It may be related to #64209, but it seems unlikely as that only affects combinations of animations using host bindings. It has no impact on the styles. We'll have to debug further.
Activity
[-]BUG: animate.leave doesn't save styles till end of transition[/-][+]BUG: animate.leave doesn't save styles till the end of the transition[/+]thePunderWoman commentedon Oct 10, 2025
This is definitely odd. It may be related to #64209, but it seems unlikely as that only affects combinations of animations using host bindings. It has no impact on the styles. We'll have to debug further.
thePunderWoman commentedon Oct 10, 2025
OK, I've found the issue. The styles are getting prematurely pruned when the element is removed. This should be a quick fix. Thanks for the report.
fix(core): Prevents early style pruning with leave animations
fix(core): Prevents early style pruning with leave animations
fix(core): Prevents early style pruning with leave animations (#64335)
fix(core): Prevents early style pruning with leave animations (angula…
angular-automatic-lock-bot commentedon Nov 14, 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.