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:
1 parent
9d7f4929ad
commit
aa3e72ec6d
1 file changed
+3
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user