Skip to content

Commit

Permalink
revert handling of JavaScript animations during view transitions (#10841
Browse files Browse the repository at this point in the history
)
  • Loading branch information
martrapp authored Apr 22, 2024
1 parent 68e3b7c commit a2df344
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/weak-swans-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Due to regression on mobile WebKit browsers, reverts a change made for JavaScript animations during view transitions.
2 changes: 0 additions & 2 deletions packages/astro/src/transitions/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a2df344

Please sign in to comment.