Replies: 3 comments 1 reply
-
Also when using the browsers navigation buttons (going back) it scrolls to the top. Searching for a way to prevent this... |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Bleuzen Since there wasn't an answer here and thinking more about it, I ended up creating a feature request ticket here: #15206 Feel free to add your use-case more in detail. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, not sure if this is a bug report or intended behavior but I noticed that if you use
Router.push
, there is no way to mention the prevention of scroll to top, like there is forLink
. Here are the docs for this: https://nextjs.org/docs/api-reference/next/router#routerpushIt seems like here in the code, there needs to be a check for
scroll
:next.js/packages/next/next-server/lib/router/router.ts
Lines 738 to 740 in 23db226
@Timer @timneutkens Is there a hidden way to do this and docs just need to be updated or there is a reason for
router.push
to not supportscroll
?@everyone-else: Do you have workarounds in the meantime?
Beta Was this translation helpful? Give feedback.
All reactions