Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep scroll position on update in Next.js #559

Open
JuroUhlar opened this issue Oct 28, 2023 · 0 comments
Open

Keep scroll position on update in Next.js #559

JuroUhlar opened this issue Oct 28, 2023 · 0 comments

Comments

@JuroUhlar
Copy link

Hi, updating the state in NextJS scrolls makes the page scroll to the top. That's usually not what you want, and I think it can be easily prevented by using router[method](newUrl, undefined, { scroll: false }) (or making the behavior configurable).

More details regarding the Next.js behavior here: vercel/next.js#20606

Thanks a lot for making this package!

@JuroUhlar JuroUhlar changed the title Keept scroll on update in Next.js Keep scroll position on update in Next.js Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant