different default scrollBehavior that resets page scroll on navigation
See original GitHub issueEnvironment
- Operating System: `Darwin`
- Node Version: `v17.3.1`
- Nuxt Version: `3.0.0-27369360.33ebb01`
- Package Manager: `yarn@1.22.17`
- Bundler: `Vite`
- User Config: `vite`, `ssr`
- Runtime Modules: `-`
- Build Modules: `-`
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 change
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:14 (3 by maintainers)
Top Results From Across the Web
scroll-behavior - CSS: Cascading Style Sheets - MDN Web Docs
The scroll-behavior CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs ...
Read more >Scroll Behavior | Vue Router
The scrollBehavior function receives the to and from route objects, like Navigation Guards. The third argument, savedPosition , is only available if this...
Read more >scroll-behavior - CSS-Tricks
The scroll-behavior property in CSS allows us to define whether the scroll location of the browser jumps to a new location or smoothly ......
Read more >How to change scroll behavior while going back in next js?
I included scroll={false} in Link but it doesn't work . How can I prevent scroll resetting when user clicks back from the post...
Read more >Changing Scroll Behavior with Vue Router | by John Au-Yeung
In this article, we'll look at how to change the scroll behavior of Vue Router ... to scroll the next page back to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@daver987 See above: https://github.com/nuxt/framework/issues/2817#issuecomment-1017155226
@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