Registry Mirror
Skip to content

File tree

‎fixtures/view-transition/src/components/Page.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ export default function Page({url, navigate}) {
150150
const cleanup1 = timeline.animate(animation1);
151151
const cleanup2 = timeline.animate(animation2);
152152
return () => {
153+
animation1.cancel();
154+
animation2.cancel();
153155
cleanup1();
154156
cleanup2();
155157
};

‎packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,6 +2525,7 @@ function animateGesture(
25252525
delay: reverse ? rangeEnd : rangeStart,
25262526
duration: reverse ? rangeStart - rangeEnd : rangeEnd - rangeStart,
25272527
});
2528+
viewTransitionAnimations.push(animation);
25282529
// Let the custom timeline take control of driving the animation.
25292530
const cleanup = timeline.animate(animation);
25302531
if (cleanup) {

0 commit comments

Comments
 (0)