webapp: always scroll up when navigating to another view

This commit is contained in:
Bernhard Kirchen 2024-10-28 21:11:07 +01:00
parent 625409fbb2
commit ae9e997cb4

View File

@ -22,6 +22,13 @@ import { createRouter, createWebHistory } from 'vue-router';
const router = createRouter({ const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL), history: createWebHistory(import.meta.env.BASE_URL),
linkActiveClass: 'active', linkActiveClass: 'active',
scrollBehavior() {
return new Promise((resolve) => {
setTimeout(() => {
resolve({ top: 0 });
}, 100);
});
},
routes: [ routes: [
{ {
path: '/', path: '/',