Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make animations more robust to quick shuffling
Previously, if transitions/animations were playing in quick succession, overlapping each other, it could have disastrous outcomes, leading to elements jumping all over the place. This PR gets that into much better state (not completely fixed, but close) by applying a few fixes: - destructure style object from `getComputedStyles`, because it's a live object with getters and we're interested in the fixed values at the beginning - `unfix` for animations didn't reset the transition styles - don't apply `fix` when we detect already-running animations on the element. That means it's already away from its original position, and doesn't need fixing. Worse, applying an absolute position can lead to the element jumping to the top left if the running animation also applies a transition style - those take precedence over the one we would apply fixes #10252
- Loading branch information