diff --git a/src/components/ModalPortal.js b/src/components/ModalPortal.js index bf5d25f5..3c8c96e2 100644 --- a/src/components/ModalPortal.js +++ b/src/components/ModalPortal.js @@ -243,7 +243,7 @@ export default class ModalPortal extends Component { }; handleOverlayOnMouseDown = event => { - if (!this.props.shouldCloseOnOverlayClick) { + if (!this.props.shouldCloseOnOverlayClick && event.target == this.overlay) { event.preventDefault(); } this.moveFromContentToOverlay = false;