Fix error on emoji picker first load
Ref: grouped-emoji-picker
This commit is contained in:
parent
d648a6f8dc
commit
c93da0b865
|
@ -133,6 +133,18 @@ const EmojiPicker = {
|
||||||
this.$lozad.mutationObserver.disconnect()
|
this.$lozad.mutationObserver.disconnect()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onShowing () {
|
||||||
|
const oldContentLoaded = this.contentLoaded
|
||||||
|
this.contentLoaded = true
|
||||||
|
this.waitForDomAndInitializeLazyLoad()
|
||||||
|
if (!oldContentLoaded) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.defaultGroup) {
|
||||||
|
this.highlight(this.defaultGroup)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -145,16 +157,14 @@ const EmojiPicker = {
|
||||||
},
|
},
|
||||||
showing (val) {
|
showing (val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.contentLoaded = true
|
this.onShowing()
|
||||||
this.waitForDomAndInitializeLazyLoad()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
if (this.defaultGroup) {
|
if (this.showing) {
|
||||||
this.highlight(this.defaultGroup)
|
this.onShowing()
|
||||||
}
|
}
|
||||||
this.waitForDomAndInitializeLazyLoad()
|
|
||||||
},
|
},
|
||||||
destroyed () {
|
destroyed () {
|
||||||
this.destroyLazyLoad()
|
this.destroyLazyLoad()
|
||||||
|
|
Loading…
Reference in New Issue