-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Open
Description
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.1Used 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.
andycloke, chaosfinity, mstrubreiter, julianpoi and keul