Skip to content

Scheduling infrastructure for absolutely everyone.

fix: Close OOO Create Modal on backdrop click (#17000)

Benny Joof5dbdae4a963
diff --git a/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx b/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx
index f2955b2be6a..de1863882cc 100644
--- a/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx
+++ b/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx
@@ -86,7 +86,6 @@ export const CreateOrEditOutOfOfficeEntryModal = ({
reasonId: 1,
},
});
- console.log(isSubmitting);
const createOrEditOutOfOfficeEntry = trpc.viewer.outOfOfficeCreateOrUpdate.useMutation({
onSuccess: () => {
@@ -105,7 +104,13 @@ export const CreateOrEditOutOfOfficeEntryModal = ({
});
return (
- <Dialog open={openModal}>
+ <Dialog
+ open={openModal}
+ onOpenChange={(open) => {
+ if (!open) {
+ closeModal();
+ }
+ }}>
<DialogContent
onOpenAutoFocus={(event) => {
event.preventDefault();