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

Scroll Reset doesn't work for large pages in Firefox #13084

Open
LucasOe opened this issue Feb 21, 2025 · 0 comments
Open

Scroll Reset doesn't work for large pages in Firefox #13084

LucasOe opened this issue Feb 21, 2025 · 0 comments
Labels

Comments

@LucasOe
Copy link

LucasOe commented Feb 21, 2025

I'm using React Router as a...

framework

Reproduction

https://stackblitz.com/edit/github-rneqjkn3?file=app%2Froutes%2Fhome.tsx

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
    Memory: 15.97 GB / 31.93 GB
  Binaries:
    npm: 10.9.2
  Browsers:
    Firefox: (135.0.1)
  npmPackages:
    @react-router/dev: ^7.2.0 => 7.2.0
    @react-router/node: ^7.2.0 => 7.2.0
    react-router: ^7.2.0 => 7.2.0
    vite: ^6.1.1 => 6.1.1

Used Package Manager

npm

Expected Behavior

When using <ScrollRestoration />, the page should scroll to the top after navigation.

In the StackBlitz environment, scroll to the bottom of the index page and click the link once. Clicking it a second time correctly scrolls to the top.

Actual Behavior

Using Firefox, the page doesn't scroll to the top after navigation if it exceeds a certain height. The threshold for this is seemingly arbitrary, during my testing it was 4840px. This behavior doesn't occur in Chromium, or when using Firefox Mobile.

@LucasOe LucasOe added the bug label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant