mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [tooltip] close tooltip when cliking iframe (#22345)
This commit is contained in:
@@ -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 }
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user