Skip to content

Commit

Permalink
fix: error in Popover and Dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Aug 26, 2022
1 parent 7291942 commit 541ed30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/runtime/components/elements/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ let closeTimeout: NodeJS.Timeout | null = null
onMounted(() => {
setTimeout(() => {
const menuProvides = trigger.value?.$.provides
if (!menuProvides) {
return
}
const menuProvidesSymbols = Object.getOwnPropertySymbols(menuProvides)
menuApi.value = menuProvidesSymbols.length && menuProvides[menuProvidesSymbols[0]]
// stop trigger click propagation on hover
Expand All @@ -192,7 +195,7 @@ onMounted(() => {
e.stopPropagation()
}
}, true)
}, 100)
}, 200)
})
function onMouseOver () {
Expand Down
5 changes: 4 additions & 1 deletion src/runtime/components/overlays/Popover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ let closeTimeout: NodeJS.Timeout | null = null
onMounted(() => {
setTimeout(() => {
const popoverProvides = trigger.value?.$.provides
if (!popoverProvides) {
return
}
const popoverProvidesSymbols = Object.getOwnPropertySymbols(popoverProvides)
popoverApi.value = popoverProvidesSymbols.length && popoverProvides[popoverProvidesSymbols[0]]
// stop trigger click propagation on hover
Expand All @@ -100,7 +103,7 @@ onMounted(() => {
e.stopPropagation()
}
}, true)
}, 0)
}, 200)
})
function onMouseOver () {
Expand Down

0 comments on commit 541ed30

Please sign in to comment.