Skip to content

Commit

Permalink
Fix #7684: ConfirmDialog close/escape report 'cancel' event (#7695)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Feb 12, 2025
1 parent 73b8c34 commit 7bf1050
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/lib/confirmdialog/ConfirmDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ export const ConfirmDialog = React.memo(

const hide = (result = 'cancel') => {
if (visibleState) {
if (typeof result !== 'string') {
result = 'cancel';
}

setVisibleState(false);
callbackFromProp('onHide', result);
DomHandler.focus(focusElementOnHide.current);
Expand Down

0 comments on commit 7bf1050

Please sign in to comment.