Skip to content

Commit cae99d9

Browse files
committed
[fixed] shouldCloseOnOverlayClick conflict with text inputs.
`shouldCloseOnOverlayClick` must only preventDefault() when the click is really on the overlay. closes #566.
1 parent 99f8933 commit cae99d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/components/ModalPortal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export default class ModalPortal extends Component {
243243
};
244244

245245
handleOverlayOnMouseDown = event => {
246-
if (!this.props.shouldCloseOnOverlayClick) {
246+
if (!this.props.shouldCloseOnOverlayClick && event.target == this.overlay) {
247247
event.preventDefault();
248248
}
249249
this.moveFromContentToOverlay = false;

0 commit comments

Comments
 (0)