diff --git a/src/components/Modal/BaseModal.js b/src/components/Modal/BaseModal.js index 7dff0fbd5330..51325f619f1a 100644 --- a/src/components/Modal/BaseModal.js +++ b/src/components/Modal/BaseModal.js @@ -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); } @@ -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); }