From aa3e72ec6de3a91814ef181c8e32925aebf20acf Mon Sep 17 00:00:00 2001 From: gorkem-bwl Date: Sun, 26 Apr 2026 01:55:49 -0400 Subject: [PATCH] fix(client): make confirmation modals dismiss on ESC Wire the dialog's onClose to onCancel for keyboard escape but ignore backdrop clicks so users can't lose work by clicking outside the modal. --- client/src/Components/inputs/Dialog.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/Components/inputs/Dialog.tsx b/client/src/Components/inputs/Dialog.tsx index b0c924f55..2b8084f85 100644 --- a/client/src/Components/inputs/Dialog.tsx +++ b/client/src/Components/inputs/Dialog.tsx @@ -46,6 +46,9 @@ export const DialogInput = ({ open={open} maxWidth={maxWidth} fullWidth={fullWidth} + onClose={(_event, reason) => { + if (reason !== "backdropClick" && onCancel) onCancel(undefined); + }} > {title && {title}}