Skip to content

Commit

Permalink
[Dialog] fix the problem that bottom body become scrollable after res…
Browse files Browse the repository at this point in the history
…izing
  • Loading branch information
vincentbel committed Oct 21, 2015
1 parent b63a94f commit 439ccfc
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 @@ -120,7 +120,7 @@ let Dialog = React.createClass({

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

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

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

});

module.exports = Dialog;

0 comments on commit 439ccfc

Please sign in to comment.