TanStack / TanStack/virtual

The page is not started at the top when navigating to a page that uses @tanstack/virtual >= v3.0.0-beta.61

Open
#646 0 comments 0 reactions 0 assignees View on GitHub

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
  1. Scroll Down
  2. click to link Dashboard
  3. 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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.