Skip to content

Commit

Permalink
Fix scrolling when expanding assets or item assets #537
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Jan 27, 2025
1 parent eddcc2c commit 55770d6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/StacBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@ const router = new VueRouter({
mode: CONFIG.historyMode,
base: CONFIG.pathPrefix,
routes: getRoutes(CONFIG),
scrollBehavior: () => ({ x: 0, y: 0 })
scrollBehavior: (to, from, savedPosition) => {
console.log(to, from);
if (to.path !== from.path) {
return { x: 0, y: 0 };
}
else {
return savedPosition;
}
}
});
// Setup store
Expand Down

0 comments on commit 55770d6

Please sign in to comment.