Skip to content

Commit

Permalink
Merge pull request #18982 from allroundexperts/fix-18558
Browse files Browse the repository at this point in the history
fix: fix escape shortcut for closing of popovers
  • Loading branch information
techievivek authored May 16, 2023
2 parents c9d5cf3 + f14f57e commit 080f228
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Modal/BaseModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class BaseModal extends PureComponent {
return;
}

Modal.willAlertModalBecomeVisible(true);

// To handle closing any modal already visible when this modal is mounted, i.e. PopoverReportActionContextMenu
Modal.setCloseModal(this.props.onClose);
}
Expand All @@ -52,6 +54,10 @@ class BaseModal extends PureComponent {
// we don't want to call the onModalHide on unmount
this.hideModal(this.props.isVisible);

if (this.props.isVisible) {
Modal.willAlertModalBecomeVisible(false);
}

// To prevent closing any modal already unmounted when this modal still remains as visible state
Modal.setCloseModal(null);
}
Expand Down

0 comments on commit 080f228

Please sign in to comment.