Skip to content

Commit 23fd701

Browse files
committedNov 10, 2015
Merge pull request mui#1946 from VincentBel/master
[Dialog] fix the problem that bottom body become scrollable after resizing
2 parents 7b0881a + 439ccfc commit 23fd701

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎src/dialog.jsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ let Dialog = React.createClass({
121121

122122
windowListeners: {
123123
keyup: '_handleWindowKeyUp',
124-
resize: '_positionDialog',
124+
resize: '_handleResize',
125125
},
126126

127127
getDefaultProps() {
@@ -469,6 +469,13 @@ let Dialog = React.createClass({
469469
}
470470
},
471471

472+
_handleResize() {
473+
if (this.state.open) {
474+
this.refs.dialogOverlay.preventScrolling();
475+
this._positionDialog();
476+
}
477+
},
478+
472479
});
473480

474481
module.exports = Dialog;

0 commit comments

Comments
 (0)
Please sign in to comment.