diff --git a/src/main.js b/src/main.js index 74721f03a..1ee95933d 100644 --- a/src/main.js +++ b/src/main.js @@ -162,6 +162,11 @@ Vue.component('Galleria', Galleria); Vue.component('CodeHighlight', CodeHighlight); +router.beforeEach(function (to, from, next) { + window.scrollTo(0, 0); + next(); +}); + new Vue({ router, render: h => h(App) diff --git a/src/router.js b/src/router.js index d794dabf6..7386d41e7 100755 --- a/src/router.js +++ b/src/router.js @@ -675,8 +675,5 @@ export default new Router({ name: 'galleriacaption', component: () => import('./views/galleria/GalleriaCaptionDemo.vue') } - ], - scrollBehavior() { - return {x: 0, y: 0}; - } + ] });