hack to make popover show up properly on first try

This commit is contained in:
Henry Jameson 2026-04-29 14:51:18 +03:00
commit 5ab0007a44

View file

@ -304,10 +304,13 @@ const Popover = {
} }
this.scrollable.addEventListener('scroll', this.onScroll) this.scrollable.addEventListener('scroll', this.onScroll)
this.scrollable.addEventListener('resize', this.onResize) this.scrollable.addEventListener('resize', this.onResize)
this.$nextTick(() => { // My assumption is that upon showing popover initially has different size
// as its contents are getting populating, so logic uses those incorrect
// sizes as basis
setTimeout(() => {
if (wasHidden) this.$emit('show') if (wasHidden) this.$emit('show')
this.updateStyles() this.updateStyles()
}) }, 1)
}, },
hidePopover() { hidePopover() {
if (this.disabled) return if (this.disabled) return