[NEXT-378] Next 13: Navigation with Link does not scroll up the page
Problem
Verify canary release [X] I verified that the issue exists in the latest Next.js canary release Provide environment information Operating System: Platform: linux Arch: x64 Version: #1 SMP Mon Sep 19 19:14:52 UTC 2022 Binaries: Node: 16.15.0 npm: 8.5.5 Yarn: 3.2.4 pnpm: N/A Relevant packages: next: 13.0.2 eslint-config-next: 13.0.0 react: 18.2.0 react-dom: 18.2.0 What browser are you using? (if relevant) Chrome 107.0.5304.87 How are you deploying your application? (if relevant) Vercel Describe the Bug When navigating between pages using `Link`, the page does not scroll up by default wich is supposed to be the default behaviour of `next/link` Expected Behavior The page scrolls up when switching pages unless I manually disable this feature of `next/link` Link to reproduction https://beta.otpfy.com/ To Reproduce Access https://beta.otpfy.com/ Scroll down until you see the "Get started for free" button Click the given button * Check that when navigating to the `auth` page the scroll is preserved and not scrolled to the top \: <sub>From SyncLinear.com | NEXT-378</sub>
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: [NEXT-378] Next 13: Navigation with Link does not scroll up the page
For now can be fixed by adding a `<ScrollUp />` component to your page: [code block]
Trust Score
6 verifications
- 1
For now can be fixed by adding a `<ScrollUp />` component to your page:
For now can be fixed by adding a `<ScrollUp />` component to your page:
Validation
Resolved in vercel/next.js GitHub issue #42492. Community reactions: 16 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep