The page is not started at the top when navigating to a page that uses @tanstack/virtual >= v3.0.0-beta.61
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 466
- Avg merge
- 2d 31m
- Merged PRs (30d)
- 13
Description
Describe the bug
The page is not started at the top when navigating to a page that uses @tanstack/virtual >= v3.0.0-beta.61.
It looks like this commit is the problem: https://github.com/TanStack/virtual/pull/592
Your minimal, reproducible example
https://codesandbox.io/p/devbox/next-js-react-virtual-wzxqt4?file=%2Fapp%2Fpage.tsx
Steps to reproduce
- Scroll Down
- click to link Dashboard
- BUG: the page is not started from the top
Expected behavior
the page should be started at the top.
https://github.com/TanStack/virtual/assets/300961/28c8ddb0-5f9a-48ec-beca-c9e1a88931d6
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
- Linux, macOS
- Chrome
tanstack-virtual version
= v3.0.0-beta.61
TypeScript version
5.2.2
Additional context
No response
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproducible example in the linked CodeSandbox, especially app/page.tsx, and reproduce the navigation after scrolling down. Compare behavior with @tanstack/virtual versions before and from v3.0.0-beta.61, using the linked upstream pull request as context. Done means navigating to Dashboard starts the page at the top.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100