mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-22 05:27:20 +00:00
Fix scrolling issue.
Looks like Vue Router's scrollBehavior is broken.
This commit is contained in:
parent
aa81677450
commit
29b49de40c
@ -149,6 +149,7 @@ export default {
|
||||
this.getVideoData();
|
||||
this.getSponsors();
|
||||
this.getComments();
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -34,6 +34,9 @@ const routes = [
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
scrollBehavior: function(_to, _from, savedPosition) {
|
||||
return savedPosition ? savedPosition : window.scrollTo(0, 0);
|
||||
},
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
Loading…
Reference in New Issue
Block a user