diff --git a/packages/vue-app/template/App.js b/packages/vue-app/template/App.js index f67601cfe4..b79fac1772 100644 --- a/packages/vue-app/template/App.js +++ b/packages/vue-app/template/App.js @@ -34,6 +34,14 @@ export default { props: { name: '<%= layoutTransition.name %>', mode: '<%= layoutTransition.mode %>' + }, + on: { + beforeEnter(el) { + // Ensure to trigger scroll event after calling scrollBehavior + window.<%= globals.nuxt %>.$nextTick(() => { + window.<%= globals.nuxt %>.$emit('triggerScroll') + }) + } } }, [ templateEl ])