Skip to content

Commit

Permalink
[fixed] regression when clicking "static" modal backdrops
Browse files Browse the repository at this point in the history
Not sure where this fell to the floor, but clearly we have no tests around it (will get to that)
  • Loading branch information
jquense committed Jul 31, 2015
1 parent b64a7a3 commit fd8d4d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,14 @@ const Modal = React.createClass({
let { animation, bsClass } = this.props;
let duration = Modal.BACKDROP_TRANSITION_DURATION;

// Don't handle clicks for "static" backdrops
let onClick = this.props.backdrop === true ?
this.handleBackdropClick : null;

let backdrop = (
<div ref="backdrop"
className={classNames(`${bsClass}-backdrop`, { in: this.props.show && !animation })}
onClick={this.handleBackdropClick}
onClick={onClick}
/>
);

Expand Down

0 comments on commit fd8d4d2

Please sign in to comment.