Description
Link to the code that reproduces this issue
https://github.com/BoubleJ/scroll_test
To Reproduce
- Go to the about page
- Lower scrolling by approximately 50px (scrolling less than layout margin value)
- Go to the dashboard page through the top tab
Current vs. Expected behavior
Current Behavior
- Scroll top not moved
The scroll does not go to the top when moving the page after scrolling less than the padding value of the layout element.
Scroll.top.not.moved.mp4
- scroll to top
If you scroll more than the padding value of the layout element and move the page, the scroll normally goes to the top.
scroll.to.top.mp4
Expected Behavior
-
I want to know why this happens.
-
How can I get the scroll to go to the top normally even if I scroll less than the layout padding area and then go to the page
-
If the layout area contains an element with a position-fixed attribute, it may be necessary to pad the layout area to show the content section at the bottom of the element.
In this case, what should I do to move the scroll normally like video 2 when moving the page.
Provide environment information
Operating System:
Platform: window
Arch: x64
Version: #1 SMP Tue June 17 21:38:13 KST 2025
Binaries:
Node: 22.15.1
npm: 11.4.0
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 15.3.3 // Latest available version is detected (14.2.8).
eslint-config-next: 14.2.8
react: 19.0.0
react-dom: 19.0.0
typescript: 5
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Linking and Navigating, Route Handlers
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response