Merge pull request #1061 from Safelite/BRM-fix-top-of-page-when-route-changes

Fix issue where "page" does not begin at top when...
This commit is contained in:
bmauger 2023-04-14 14:04:10 -04:00 committed by GitHub
commit 307f31060c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,6 +161,11 @@ const routes = [
const router = createRouter({
history: createWebHistory("/fmg/"),
routes,
//Cause "page" to begin at the top when route chanages.
scrollBehavior(to, from, savedPosition) {
// always scroll to top
return { top: 0 };
},
});
//---------------------------------------------------------- Router Functions ----------------------------------------------------------