From b10751e8749fe4bd5db28941de2f51829593a05f Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Tue, 7 Mar 2017 19:34:29 +0100 Subject: [PATCH] client: router: always scroll to the top --- website/client/router.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/client/router.js b/website/client/router.js index 2a01b5689c..f63e16e6e3 100644 --- a/website/client/router.js +++ b/website/client/router.js @@ -27,6 +27,11 @@ export default new VueRouter({ mode: 'history', base: process.env.NODE_ENV === 'production' ? '/new-app' : __dirname, // eslint-disable-line no-process-env 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: [ { name: 'tasks', path: '/', component: UserTasks }, {