Skip to content

Clicking hash link twice on Firefox breaks back navigation #8725

Description

@teemingc

Describe the bug

This issue only occurs when using the desktop Firefox browser.

Clicking a hash link twice then navigating to a new page causes the browser back navigation to change the URL but no navigation occurs.

Reproduction

https://stackblitz.com/edit/github-lxdc8e?file=src%2Froutes%2F%2Blayout.svelte

  1. Preview the website in a desktop Firefox browser.
  2. On the same page, click the "Go to footer" hash link twice.
  3. Navigate to a different page.
  4. Press the browser back button.
  5. The browser does not navigate back but the URL changes.

Logs

No response

System Info

System:
    OS: macOS 13.2
    CPU: (8) arm64 Apple M1 Pro
    Memory: 3.76 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
    Yarn: 3.2.3 - ~/.nvm/versions/node/v16.18.0/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.87
    Chrome Canary: 111.0.5559.0
    Firefox: 109.0
    Firefox Developer Edition: 105.0
    Safari: 16.3
    Safari Technology Preview: 16.4
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.0 => 1.0.2 
    @sveltejs/kit: ^1.0.0 => 1.2.8 
    svelte: ^3.54.0 => 3.55.1 
    vite: ^4.0.0 => 4.0.4

Severity

serious, but I can work around it

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions