Skip to content

Commit

Permalink
Clicking outside of an open dialog will no longer close it. (#599)
Browse files Browse the repository at this point in the history
Signed-off-by: BOUTIER Charly <charly.boutier@rte-france.com>
  • Loading branch information
EstherDarkish authored Oct 2, 2024
1 parent 350e4a2 commit e172c13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/dialogs/customMuiDialog/CustomMuiDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ function CustomMuiDialog({
);

const handleClose = (event: React.MouseEvent, reason?: string) => {
if (reason === 'backdropClick' && onCancel) {
onCancel();
if (reason === 'backdropClick') {
return;
}
onClose(event);
};
Expand Down

0 comments on commit e172c13

Please sign in to comment.