From 439ccfc0edb5c9c8af24b498f755d2c8bafb2e4f Mon Sep 17 00:00:00 2001 From: VincentBel Date: Wed, 21 Oct 2015 12:36:34 +0800 Subject: [PATCH] [Dialog] fix the problem that bottom body become scrollable after resizing --- src/dialog.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/dialog.jsx b/src/dialog.jsx index 77ee8650c49c27..9d80b21ee89be5 100644 --- a/src/dialog.jsx +++ b/src/dialog.jsx @@ -120,7 +120,7 @@ let Dialog = React.createClass({ windowListeners: { keyup: '_handleWindowKeyUp', - resize: '_positionDialog', + resize: '_handleResize', }, getDefaultProps() { @@ -403,6 +403,13 @@ let Dialog = React.createClass({ } }, + _handleResize() { + if (this.state.open) { + this.refs.dialogOverlay.preventScrolling(); + this._positionDialog(); + } + }, + }); module.exports = Dialog;