-
Notifications
You must be signed in to change notification settings - Fork 779
Closed
Labels
css-view-transitions-1View Transitions; Bugs onlyView Transitions; Bugs only
Description
Per spec, this snippet calls the transition callback twice:
document.startViewTransition(async function() {
console.log("cb");
document.startViewTransition(() => {});
});This is in fact what happens in Safari TP, and in my experimental Firefox implementation.
This is because call the update callback says:
- Otherwise, set callbackPromise to the result of invoking transition’s update callback.
- If transition’s phase is not "done", then set transition’s phase to "update-callback-called".
But that's already too late, because if something (like startViewTransition) skips the transition, the state is not "update-callback-called".
It seems for this specific case, just swapping those two steps should work. But might be worth looking at similar things in the spec.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
css-view-transitions-1View Transitions; Bugs onlyView Transitions; Bugs only