UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 7853605e authored by Graham Smith's avatar Graham Smith
Browse files

reset scroll position

parent 52f8bc53
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,19 @@ const routes = [
const router = new VueRouter({
base: process.env.BASE_URL,
routes
routes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition;
}
if (to.hash) {
return {
selector: to.hash
};
}
return { x: 0, y: 0 };
}
});
const vueBodyClass = new VueBodyClass(routes);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment