mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
fix(scrollBehavior): emit triggerScroll event after changing layer (#4399)
resolves: #4080
This commit is contained in:
parent
9f274364ce
commit
330301cacf
@ -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 ])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user