Skip to content

Commit

Permalink
Merge pull request #1946 from VincentBel/master
Browse files Browse the repository at this point in the history
[Dialog] fix the problem that bottom body become scrollable after resizing
  • Loading branch information
shaurya947 committed Nov 10, 2015
2 parents 7b0881a + 439ccfc commit 23fd701
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ let Dialog = React.createClass({

windowListeners: {
keyup: '_handleWindowKeyUp',
resize: '_positionDialog',
resize: '_handleResize',
},

getDefaultProps() {
Expand Down Expand Up @@ -469,6 +469,13 @@ let Dialog = React.createClass({
}
},

_handleResize() {
if (this.state.open) {
this.refs.dialogOverlay.preventScrolling();
this._positionDialog();
}
},

});

module.exports = Dialog;

0 comments on commit 23fd701

Please sign in to comment.