Fixed client side error

This commit is contained in:
Alexis
2025-04-15 21:09:02 +02:00
parent a50824bd4f
commit f1abae1cce
2 changed files with 6 additions and 10 deletions

View File

@@ -35,8 +35,7 @@ function openEventCreatePopover() {
*
* @param e The closing event (can be keydown or click)
*/
function handleClosing(e: Event) {
e.preventDefault()
function handleClosing() {
popoverOpen.value = false
resetSkeleton()
}
@@ -54,8 +53,8 @@ function handleClosing(e: Event) {
:disable-outside-pointer-events="true"
:trap-focus="true"
class="pl-3 w-[30rem] max-w-full border-indigo-200 dark:bg-slate-950 dark:border-indigo-950"
@escape-key-down="handleClosing"
@pointer-down-outside="handleClosing"
@escape-key-down.prevent="handleClosing"
@pointer-down-outside.prevent="handleClosing"
>
<CalendarFormCreateEvent @event-created="handleClosing" />
</UiPopoverContent>

View File

@@ -11,11 +11,8 @@ function toggleDialog() {
/**
* Prevents the modal from closing if's still loading
*
* @param e The closing event (can be keydown or click)
*/
function handleClosing(e: Event) {
e.preventDefault()
function handleClosing() {
setTimeout(() => resetSkeleton(), 100)
}
</script>
@@ -32,8 +29,8 @@ function handleClosing(e: Event) {
<UiDialog v-model:open="isDialogOpen">
<UiDialogContent
class="border-indigo-200 dark:bg-slate-950 dark:border-indigo-950"
@escape-key-down="handleClosing"
@pointer-down-outside="handleClosing"
@escape-key-down.prevent="handleClosing"
@pointer-down-outside.prevent="handleClosing"
>
<UiDialogTitle>
{{ $t("entity.calendar.event.addSingle") }}