mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
fix(scrollBehavior): emit triggerScroll event after changing layer (#4399)
resolves: #4080
This commit is contained in:
parent
8030ca1a3d
commit
0c6c69b011
@ -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