Content visibility breaks navigation back
Open
Nobody has claimed this yet.
Linking and Navigating
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://github.com/avaltat/next-content-visibility
To Reproduce
- Clone the repo
- Navigate to /foo
- Scroll to the middle of the page
- Navigate to bar and then navigate back
Current vs. Expected behavior
The back navigation is not at the same scroll position
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:56 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T6041
Available memory (MB): 24576
Available CPU cores: 12
Binaries:
Node: 22.21.1
npm: 11.6.4
Yarn: 1.22.22
pnpm: N/A
Relevant Packages:
next: 16.1.0 // Latest available version is detected (16.1.0).
eslint-config-next: N/A
react: 19.2.3
react-dom: 19.2.3
typescript: 5.9.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Linking and Navigating
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed)
Additional context
No response
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
Clone the reproduction at https://github.com/avaltat/next-content-visibility and follow the /foo-to-bar navigation steps, including scrolling to the middle of the page. Compare the scroll position after navigating back with the original position; done means back navigation restores the prior scroll position in the deployed environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, react
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100