Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defer persisted state restore when view transition is started #9996

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Dec 15, 2023

  1. Defer persisted state restore when view transition is started

    When starting a view transition right before state restoration,
    e.g. `addEventListener("popstate", () => startViewTransition(() => {...}))`,
    according to the current spec the scroll position would be restored
    before the `startViewTransition` callback is called, which means that
    it would be captured as part of the old state, even though it belongs
    to the new state.
    
    This change makes it so that we defer persisted state restoration
    until after the old state is captured.
    
    Together with w3c/csswg-drafts#9676
    noamr committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    c158b7c View commit details
    Browse the repository at this point in the history