1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-19 23:40:07 +00:00

fix: ModalDialog component has focus error in :use-v-if="false" mode. (#494)

This commit is contained in:
Ayaka Rizumu 2022-12-21 22:41:27 +08:00 committed by GitHub
parent ed7989cc2c
commit deb5cc2428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ const elDialogMain = ref<HTMLDivElement>()
const elDialogRoot = ref<HTMLDivElement>()
const { activate } = useFocusTrap(elDialogRoot, {
immediate: true,
immediate: false,
allowOutsideClick: true,
clickOutsideDeactivates: true,
escapeDeactivates: true,
@ -137,9 +137,9 @@ export default {
</script>
<template>
<Teleport to="body" @transitionend="trapFocusDialog">
<Teleport to="body">
<!-- Dialog component -->
<Transition name="dialog-visible">
<Transition name="dialog-visible" @transitionend="trapFocusDialog">
<div
v-if="isVIf"
v-show="isVShow"