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

Simplify same page anchor visits #1285

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Jul 20, 2024

  1. Tidy history popstate handling.

    Safari stopped triggering popstate on load from version 10 (~2016) so we can safely remove this workaround. https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event#the_history_stack
    domchristie committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    94c1574 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7adbf9f View commit details
    Browse the repository at this point in the history
  3. Handle same-page anchor clicks by checking for absence of popstate data.

    Absent popstate event data suggests that the event originates from a same-page anchor click. Reconcile the empty state by incrementing the History's currentIndex, replacing the null history entry, setting the View's lastRenderedLocation, and then caching it
    domchristie committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    4ba8aea View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2024

  1. Configuration menu
    Copy the full SHA
    a262b72 View commit details
    Browse the repository at this point in the history