scrollY persists on page change instead of starting at the top
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 29k
- Forks
- 4k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 71
Description
Issue Description
When I click from one page to another, the scrollY value persists, and I'll start at the middle of another page instead of the top. I'm not sure if it fully qualifies as a bug, but I've noticed it happens both on my site and other Gitbook sites I've visited.
Steps to Reproduce
- Navigate to a page
- Scroll down anywhere
- Navigate to another page, end up in the middle
Example
This example is from another GitBook site:
https://github.com/user-attachments/assets/5826b67c-ba02-4971-97f6-09e966357f07
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 by reproducing the reported navigation flow: open a page, scroll down, then navigate to another page and observe the scroll position. Trace the page-change handling that controls scroll restoration; done means the destination page consistently opens at the top, including the reported GitBook-site scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100