Scroll behaviour when using Prefetch + ssr
-
scrollBehavior: () => ({ x: 0, y: 0 }),
ScrollBehaviour
was working as expected, navigating the user to the top on route entry.However, after implementing
preFetching
this behaviour doesn’t work any more. instead, the scroll posiition is preserved from the previous router.
Any idea why this is happening?
EDIT: After further debugging the problem seems to be related to quasar Loading plugin
this is theprefetch
hook where I callLoading
preFetch({ store }) { Loading.show(); return store.dispatch("getDoctors").then(success => { Loading.hide(); }); },
-
I have the same problem
-
I noticed they are using
preventScroll
in theLoading.js
file and this is apparently the bug source, when I removed it to test, the scrolling worked as expected