You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but it always pushes me to the top using the back button. If I remove it, it always uses the same scroll position.
So it doesn't work without the workaround.
Nuxt always scroll top when route is changed. You have any overflow: hidden, overflow-y: hidden or overflow-x: hidden css line for body/html? If is exist you should try to remove them.
Environment
Linux
v18.7.0
2.16.0-27616340.013f051b
[email protected]
webpack
build
,buildModules
,components
,css
,head
,modules
,plugins
,srcDir
,ssr
,target
,serverHandlers
,devServerHandlers
,bridge
-
()
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@pinia/[email protected]
,@nuxt/[email protected]
Reproduction
N/A
I just saw
https://nuxtjs.org/docs/components-glossary/scrolltotop/
but with the
composition api
it's impossible to useNuxt default scroll behaviour doesn't work if I can't set this option in the
composition api
:https://nuxtjs.org/docs/configuration-glossary/configuration-router/#scrollbehavior
Describe the bug
The scroll position is always the same.
I want to scroll to top on new routes and if going back I want to restore my previous scroll position.
Additional context
I use this workaround for now:
#component back button
#src/app/router.scrollBehavior.js
Logs
The text was updated successfully, but these errors were encountered: