Disabled close interactions on create event popover
This commit is contained in:
@@ -49,6 +49,17 @@ async function handleSubmit() {
|
|||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param e The closing event (can be keydown or click)
|
||||||
|
*/
|
||||||
|
function handleClosing(e: Event) {
|
||||||
|
console.log(e)
|
||||||
|
if (isLoading.value) {
|
||||||
|
e.preventDefault()
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -60,7 +71,13 @@ async function handleSubmit() {
|
|||||||
:align="'center'"
|
:align="'center'"
|
||||||
:side="'right'"
|
:side="'right'"
|
||||||
:collision-padding="60"
|
:collision-padding="60"
|
||||||
|
:disable-outside-pointer-events="true"
|
||||||
|
:trap-focus="true"
|
||||||
class="pl-3 min-w-96 bg-slate-900 border-slate-800"
|
class="pl-3 min-w-96 bg-slate-900 border-slate-800"
|
||||||
|
@escape-key-down="handleClosing"
|
||||||
|
@focus-outside="handleClosing"
|
||||||
|
@interact-outside="handleClosing"
|
||||||
|
@pointer-down-outside="handleClosing"
|
||||||
>
|
>
|
||||||
<form @submit.prevent="handleSubmit">
|
<form @submit.prevent="handleSubmit">
|
||||||
<div class="grid grid-cols-2 gap-y-4">
|
<div class="grid grid-cols-2 gap-y-4">
|
||||||
|
|||||||
Reference in New Issue
Block a user