Navigation between pages is always preserving scroll (Not desired) #1242
Unanswered
faridsa
asked this question in
Help (Vue)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a standard laravel + inertia + vue3 setup using breeze, and as Inertia docs says, navigation between pages should mimic browser default behavior reseting scroll to top when page loads. But it is not working this way in my case.
I don't have
preserveScroll: true
in my links but this happens anyway.I Have tried with a vuejs onMounted() hook to scroll top when component loads, but it is not working either
edited 29/07
I just realized that this hook is working but inmediately the page scrolls from top to last scroll position from previous page.
So I've deactivated this hook because its ugly effect.
Any idea on how to solve this?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions