Skip to content

Commit

Permalink
Revert "[fixed] Dont change body class if isOpen not change (#201)"
Browse files Browse the repository at this point in the history
This reverts commit 1e29e4f.
  • Loading branch information
claydiffrient committed Sep 14, 2016
1 parent 8e5f5b7 commit 6550b87
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lib/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,14 @@ var Modal = React.createClass({
},

renderPortal: function(props) {
if (this.props.isOpen !== props.isOpen) {
if (props.isOpen) {
elementClass(document.body).add('ReactModal__Body--open');
} else {
elementClass(document.body).remove('ReactModal__Body--open');
}
if (props.isOpen) {
elementClass(document.body).add('ReactModal__Body--open');
} else {
elementClass(document.body).remove('ReactModal__Body--open');
}

if (props.ariaHideApp) {
ariaAppHider.toggle(props.isOpen, props.appElement);
}
if (props.ariaHideApp) {
ariaAppHider.toggle(props.isOpen, props.appElement);
}

this.portal = renderSubtreeIntoContainer(this, ModalPortal(Assign({}, props, {defaultStyles: Modal.defaultStyles})), this.node);
Expand Down

0 comments on commit 6550b87

Please sign in to comment.