Skip to content

Commit

Permalink
[Dialog] Call preventScrolling whenever the Dialog is open at mount.
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgenEvens committed Oct 28, 2015
1 parent 711a9b5 commit 8070abf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ let Dialog = React.createClass({

componentDidMount() {
this._positionDialog();
if (this.props.openImmediately) {
if (this.isOpen()) {
this.refs.dialogOverlay.preventScrolling();
}
},
Expand Down

0 comments on commit 8070abf

Please sign in to comment.