Skip to content

Commit

Permalink
[fixed] shouldCloseOnOverlayClick conflict with text inputs.
Browse files Browse the repository at this point in the history
`shouldCloseOnOverlayClick` must only preventDefault() when
the click is really on the overlay.

closes #566.
  • Loading branch information
diasbruno committed Nov 27, 2017
1 parent 99f8933 commit cae99d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ModalPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cae99d9

Please sign in to comment.