-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
Which project does this relate to?
Router
Describe the bug
When navigating from an index to a $details page. The scroll state carries over causing the new page to be loaded with the same scroll position as the index page. Setting scrollRestoration: true in createRouter fixes the issue.
Your Example Website or App
https://github.com/zocke1r/scrroll-repro
Steps to Reproduce the Bug or Issue
- Navigate to /cards
- scroll to the bottom of the page
- Click on yellow block
- Observe Scroll state on details page
- Go Back
- scroll to top
- Click on yellow block
- observe Scroll state on details page
Expected behavior
As a user i would expect that when navigating to a different page, the new page gets displayed scrolled to the top, no matter where i was on the previous page.
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.141.2
- OS: Windows
- Browser: Chrome [e.g. Chrome, Safari, Firefox]
- Browser Version: 143.0.7499.41
- Bundler: vite
- Bundler Version: 7.2.7
Additional context
No response
nicholasgriffintncoderabbitai
Metadata
Metadata
Assignees
Labels
No labels