Skip to content

Commit 4dd8ee3

Browse files
committed
[fixed] handleOverlayOnClick stopPropagation
1 parent 18bb4d8 commit 4dd8ee3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/ModalPortal.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,9 @@ export default class ModalPortal extends Component {
285285
};
286286

287287
handleOverlayOnClick = event => {
288-
event.stopPropagation();
288+
if (!this.props.shouldCloseOnOverlayClick) {
289+
event.stopPropagation();
290+
}
289291

290292
if (this.shouldClose === null) {
291293
this.shouldClose = true;

0 commit comments

Comments
 (0)