mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-23 11:59:34 +08:00
fix(components): [tour] focusout error (#15970)
This commit is contained in:
parent
705c999f5f
commit
9785ad1cd0
@ -12,6 +12,7 @@
|
||||
focus-start-el="container"
|
||||
:focus-trap-el="contentRef || undefined"
|
||||
@release-requested="onCloseRequested"
|
||||
@focusout-prevented="onFocusoutPrevented"
|
||||
>
|
||||
<slot />
|
||||
</el-focus-trap>
|
||||
@ -68,4 +69,10 @@ const { ns } = inject(tourKey)!
|
||||
const onCloseRequested = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
const onFocusoutPrevented = (event: CustomEvent) => {
|
||||
if (event.detail.focusReason === 'pointer') {
|
||||
event.preventDefault()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user