Skip to content

Commit

Permalink
fix(Modal): click-outside by mousedown (carbon-design-system#3014)
Browse files Browse the repository at this point in the history
  • Loading branch information
asudoh authored and emyarod committed Jun 18, 2019
1 parent a0104a8 commit 0ea5b65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/components/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default class Modal extends Component {
}
};

handleClick = evt => {
handleMousedown = evt => {
if (
this.innerModal.current &&
!this.innerModal.current.contains(evt.target) &&
Expand Down Expand Up @@ -329,7 +329,7 @@ export default class Modal extends Component {
<div
{...other}
onKeyDown={this.handleKeyDown}
onClick={this.handleClick}
onMouseDown={this.handleMousedown}
onBlur={this.handleBlur}
className={modalClasses}
role="presentation"
Expand Down

0 comments on commit 0ea5b65

Please sign in to comment.