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:
commit
307f31060c
1 changed files with 5 additions and 0 deletions
|
|
@ -161,6 +161,11 @@ const routes = [
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory("/fmg/"),
|
history: createWebHistory("/fmg/"),
|
||||||
routes,
|
routes,
|
||||||
|
//Cause "page" to begin at the top when route chanages.
|
||||||
|
scrollBehavior(to, from, savedPosition) {
|
||||||
|
// always scroll to top
|
||||||
|
return { top: 0 };
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
//---------------------------------------------------------- Router Functions ----------------------------------------------------------
|
//---------------------------------------------------------- Router Functions ----------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue