0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

revert handling of JavaScript animations during view transitions (#10841)

This commit is contained in:
Martin Trapp 2024-04-22 12:18:37 +02:00 committed by GitHub
parent 68e3b7c59d
commit a2df344bff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Due to regression on mobile WebKit browsers, reverts a change made for JavaScript animations during view transitions.

View file

@ -397,8 +397,6 @@ async function updateDOM(
return style.animationIterationCount === 'infinite';
}
const currentAnimations = document.getAnimations();
// allow animations triggered by viewTransition.ready to start
await new Promise<void>((r) => setTimeout(r));
// Trigger view transition animations waiting for data-astro-transition-fallback
document.documentElement.setAttribute(OLD_NEW_ATTR, phase);
const nextAnimations = document.getAnimations();