We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58b2301 commit c15fec6Copy full SHA for c15fec6
src/mocks/web-animations-api/elementAnimations.ts
@@ -28,5 +28,12 @@ export function getAllAnimations() {
28
}
29
30
export function clearAnimations() {
31
+ // Cancel all running animations to prevent requestAnimationFrame errors during teardown
32
+ const allAnimations = getAllAnimations();
33
+ allAnimations.forEach((animation) => {
34
+ // Cancel the animation properly - this stops the requestAnimationFrame loop
35
+ animation.cancel();
36
+ });
37
+
38
elementAnimations.clear();
39
0 commit comments