sveltejs / sveltejs/kit

Navigating to anchor prevents page scrolling on navigation (Firefox)

Open
#13,574 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

awaiting submitter
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the bug

I have /#about anchor link in footer leading to "About" page section. When i click to anchor section it transfers my view to "About" section, but after i click another link leading to another page no scroll happens (All my links without data-sveltekit-noscroll)
(No problem in chromium based browsers)

Reproduction
  1. Create two pages (ex "/", "/page")
  2. Create navigation with two links one of them must be with anchor (ex. "/#about")
  3. Make sure both of your pages has height more than 100vh
  4. Scroll page a little
  5. Click on the link with anchor
  6. Click on the link without anchor leading to another page
Logs

System Info
Firefox
Severity

annoyance

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two-page navigation steps in Firefox with pages taller than 100vh, including a link to /#about and a link to /page without data-sveltekit-noscroll. Compare the scroll position after each navigation with Chromium, and consider the issue done when navigation consistently scrolls as expected in Firefox without that attribute.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.