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.
This commit is contained in:
gorkem-bwl authored and Alex Holliday committed 2026-04-27 10:52:24 -07:00
1 parent ab81c76395
commit 79f8947742
1 file changed
+3
+3
View File
@@ -46,6 +46,9 @@ export const DialogInput = ({
open={open}
maxWidth={maxWidth}
fullWidth={fullWidth}
onClose={(_event, reason) => {
if (reason !== "backdropClick" && onCancel) onCancel(undefined);
}}
>
{title && <DialogTitle sx={{ fontSize: typographyLevels.l }}>{title}</DialogTitle>}
<DialogContent>