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
different default scrollBehavior that resets page scroll on navigation #13284
Comments
It may be solved by installing a plugin for router. |
@K-Honkawa thanks! i'll try that but the default behaviour should be to reset the scroll so i'll keep this open as a bug |
I don't think this is a Nuxt3 issue as NuxtLink is RouterLink in |
That could be the case but it is possible that NuxtLink extends RouterLink and overrides its behaviour |
Any news on this issue, or is there a quick fix to get pages to scroll to top on page change. :) |
Ah ok, I saw the comment but missed the link. Awesome thanks! Greatly appreciated! :)
…Sent from my iPhone
On Jan 31, 2022, at 08:30, Daniel Roe ***@***.***> wrote:
@daver987<https://github.com/daver987> See above: nuxt/nuxt#13284 (comment)<#13284>
—
Reply to this email directly, view it on GitHub<#13284>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AUIQIWV62HCEPNOZ7WUNRX3UY2FGPANCNFSM5MKZCUEA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
and in case you wanna add a bit delay, you can check it out https://github.com/nuxt/framework/discussions/1661#discussioncomment-2159828 |
This is now configurable with nuxt/framework#3485. See https://v3.nuxtjs.org/docs/directory-structure/pages#router-options for documentation. |
@danielroe awesome! this should replace the workaround mentioned above #13284 |
I tried adding a plugin do change the scroll behavior like so: Works when running "nuxi dev" |
What is slightly undesirable about the
|
heads up, the PR nuxt/framework#3851 just got merged 🎉 |
This should be resolved in the edge channel, or in the next RC. Let me know if not and I'll reopen. |
Environment
Reproduction
No reproduction needed imo
Describe the bug
When navigating using a
<NuxtLink to="/othePage" />
the page scroll is not resetting.In other words, the page does not
scrollToTop
on route changeAdditional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: