forked from Mirrors/elk
fix: ModalDialog
component has focus error in :use-v-if="false"
mode. (#494)
This commit is contained in:
parent
ed7989cc2c
commit
deb5cc2428
1 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,7 @@ const elDialogMain = ref<HTMLDivElement>()
|
||||||
const elDialogRoot = ref<HTMLDivElement>()
|
const elDialogRoot = ref<HTMLDivElement>()
|
||||||
|
|
||||||
const { activate } = useFocusTrap(elDialogRoot, {
|
const { activate } = useFocusTrap(elDialogRoot, {
|
||||||
immediate: true,
|
immediate: false,
|
||||||
allowOutsideClick: true,
|
allowOutsideClick: true,
|
||||||
clickOutsideDeactivates: true,
|
clickOutsideDeactivates: true,
|
||||||
escapeDeactivates: true,
|
escapeDeactivates: true,
|
||||||
|
@ -137,9 +137,9 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Teleport to="body" @transitionend="trapFocusDialog">
|
<Teleport to="body">
|
||||||
<!-- Dialog component -->
|
<!-- Dialog component -->
|
||||||
<Transition name="dialog-visible">
|
<Transition name="dialog-visible" @transitionend="trapFocusDialog">
|
||||||
<div
|
<div
|
||||||
v-if="isVIf"
|
v-if="isVIf"
|
||||||
v-show="isVShow"
|
v-show="isVShow"
|
||||||
|
|
Loading…
Reference in a new issue