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 committed 2026-04-26 01:55:49 -04:00
1 parent 9d7f4929ad
commit aa3e72ec6d
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>