From 6550b87636546701e4aa9d90a67b4c2f431a86fe Mon Sep 17 00:00:00 2001 From: Clay Diffrient Date: Tue, 13 Sep 2016 22:23:06 -0600 Subject: [PATCH] Revert "[fixed] Dont change body class if isOpen not change (#201)" This reverts commit 1e29e4f3bd482bf3320969abbda6c586801bd283. --- lib/components/Modal.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/components/Modal.js b/lib/components/Modal.js index cbabf565..43401344 100644 --- a/lib/components/Modal.js +++ b/lib/components/Modal.js @@ -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);