fix(components): [tooltip] close tooltip when cliking iframe (#22345)

This commit is contained in:
Noblet Ouways
2025-09-28 17:06:38 +02:00
committed by GitHub
parent e5dd4ea86e
commit 95f0773c79

View File

@@ -176,15 +176,19 @@ watch(
stopHandle?.()
} else {
ariaHidden.value = false
stopHandle = onClickOutside(popperContentRef, () => {
if (unref(controlled)) return
const needClose = castArray(unref(trigger)).every((item) => {
return item !== 'hover' && item !== 'focus'
})
if (needClose) {
onClose()
}
})
stopHandle = onClickOutside(
popperContentRef,
() => {
if (unref(controlled)) return
const needClose = castArray(unref(trigger)).every((item) => {
return item !== 'hover' && item !== 'focus'
})
if (needClose) {
onClose()
}
},
{ detectIframe: true }
)
}
},
{