Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,12 @@ export function startViewTransition(
}
} finally {
// Continue the reset of the work.
// If the error happened in the snapshot phase before the update callback
// was invoked, then we need to first finish the mutation and layout phases.
// If they're already invoked it's still safe to call them due the status check.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// If they're already invoked it's still safe to call them due the status check.
// If they're already invoked it's still safe to call them due to the status check.

mutationCallback();
layoutCallback();
// Skip afterMutationCallback() since we're not animating.
spawnedWorkCallback();
}
};
Expand Down Expand Up @@ -2137,7 +2143,13 @@ export function startGestureTransition(
}
} finally {
// Continue the reset of the work.
readyCallback();
// If the error happened in the snapshot phase before the update callback
// was invoked, then we need to first finish the mutation and layout phases.
// If they're already invoked it's still safe to call them due the status check.
mutationCallback();
// Skip readyCallback() and go straight to animateCallbck() since we're not animating.
// animateCallback() is still required to restore states.
animateCallback();
}
};
transition.ready.then(readyForAnimations, handleError);
Expand Down
Loading