Skip to content

Commit

Permalink
[fixed] handleOverlayOnClick stopPropagation
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoGabriel55 committed Apr 22, 2022
1 parent 18bb4d8 commit 4dd8ee3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ModalPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ export default class ModalPortal extends Component {
};

handleOverlayOnClick = event => {
event.stopPropagation();
if (!this.props.shouldCloseOnOverlayClick) {
event.stopPropagation();
}

if (this.shouldClose === null) {
this.shouldClose = true;
Expand Down

0 comments on commit 4dd8ee3

Please sign in to comment.