Skip to content

Open-source status page, incident response and uptime monitoring

fix: dialog pointer-events ui blocker (#2014)

Maximilian Kaske255bc215222d
diff --git a/apps/dashboard/src/components/forms/settings/form-api-key.tsx b/apps/dashboard/src/components/forms/settings/form-api-key.tsx
index b9c338961..d7bb9a440 100644
--- a/apps/dashboard/src/components/forms/settings/form-api-key.tsx
+++ b/apps/dashboard/src/components/forms/settings/form-api-key.tsx
@@ -178,7 +178,12 @@ export function FormApiKey() {
<DialogTrigger asChild>
<Button size="sm">Create</Button>
</DialogTrigger>
- <DialogContent>
+ <DialogContent
+ onCloseAutoFocus={(event) => {
+ event.preventDefault();
+ document.body.style.pointerEvents = "";
+ }}
+ >
<Form {...form}>
<form onSubmit={form.handleSubmit(createAction)}>
<DialogHeader>
@@ -224,7 +229,7 @@ export function FormApiKey() {
render={({ field }) => (
<FormItem className="flex flex-col">
<FormLabel>Expiration Date</FormLabel>
- <Popover modal>
+ <Popover>
<FormControl>
<PopoverTrigger asChild>
<Button
@@ -299,7 +304,12 @@ export function FormApiKey() {
</Dialog>
</FormCardFooter>
<AlertDialog open={!!result} onOpenChange={() => setResult(null)}>
- <AlertDialogContent>
+ <AlertDialogContent
+ onCloseAutoFocus={(event) => {
+ event.preventDefault();
+ document.body.style.pointerEvents = "";
+ }}
+ >
<AlertDialogHeader>
<AlertDialogTitle>API Key Created</AlertDialogTitle>
<AlertDialogDescription>