mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
client: router: always scroll to the top
This commit is contained in:
@@ -27,6 +27,11 @@ export default new VueRouter({
|
|||||||
mode: 'history',
|
mode: 'history',
|
||||||
base: process.env.NODE_ENV === 'production' ? '/new-app' : __dirname, // eslint-disable-line no-process-env
|
base: process.env.NODE_ENV === 'production' ? '/new-app' : __dirname, // eslint-disable-line no-process-env
|
||||||
linkActiveClass: 'active',
|
linkActiveClass: 'active',
|
||||||
|
// When navigating to another route always scroll to the top
|
||||||
|
// To customize the behavior see https://router.vuejs.org/en/advanced/scroll-behavior.html
|
||||||
|
scrollBehavior () {
|
||||||
|
return { x: 0, y: 0 };
|
||||||
|
},
|
||||||
routes: [
|
routes: [
|
||||||
{ name: 'tasks', path: '/', component: UserTasks },
|
{ name: 'tasks', path: '/', component: UserTasks },
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user