Skip to content

Conversation

@thePunderWoman
Copy link
Contributor

@thePunderWoman thePunderWoman commented Aug 5, 2025

Any time something causes styles to recalculate,element.getAnimations() will be empty. This updates animate.enter and animate.leave to rely on getComputedStyles as a fallback to determine the longest animation.

This should also improve performance as this reduces the calls to get the longest animation only when the event.target is the element in question. It'll ignore bubbled up animation events now.

fixes: #63006

@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: minor This PR is targeted for the next minor release labels Aug 5, 2025
@ngbot ngbot bot added this to the Backlog milestone Aug 5, 2025
@thePunderWoman thePunderWoman force-pushed the robust-fix branch 2 times, most recently from 7e6ca5c to e53d841 Compare August 5, 2025 13:14
Any time something causes styles to recalculate,
`element.getAnimations()` will be empty. This updates `animate.enter`
and `animate.leave` to rely on `getComputedStyles` to determine the
longest animation instead.

fixes: angular#63006
@thePunderWoman thePunderWoman removed the request for review from JeanMeche August 6, 2025 08:23
@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 Aug 6, 2025
@ngbot
Copy link

ngbot bot commented Aug 6, 2025

I see that you just added the action: merge label, but the following checks are still failing:
    failure status "google-internal-tests" is failing

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken main, please try rebasing to main and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@crisbeto
Copy link
Member

crisbeto commented Aug 6, 2025

This PR was merged into the repository by commit ebd622b.

The changes were merged into the following branches: main

@crisbeto crisbeto closed this in ebd622b Aug 6, 2025
@angular-automatic-lock-bot
Copy link

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 Sep 6, 2025
@thePunderWoman thePunderWoman deleted the robust-fix branch September 12, 2025 16:38
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: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Style recalculations will cause animate.enter and animate.leave to misbehave

2 participants