diff --git a/lib/components/Modal.js b/lib/components/Modal.js index 3d566b50..49f0a86c 100644 --- a/lib/components/Modal.js +++ b/lib/components/Modal.js @@ -4,6 +4,7 @@ var ExecutionEnvironment = require('exenv'); var ModalPortal = React.createFactory(require('./ModalPortal')); var ariaAppHider = require('../helpers/ariaAppHider'); var elementClass = require('element-class'); +var renderSubtreeIntoContainer = require("react-dom").unstable_renderSubtreeIntoContainer; var SafeHTMLElement = ExecutionEnvironment.canUseDOM ? window.HTMLElement : {}; @@ -66,7 +67,7 @@ var Modal = module.exports = React.createClass({ ariaAppHider.toggle(props.isOpen, props.appElement); } sanitizeProps(props); - this.portal = ReactDOM.render(ModalPortal(props), this.node); + this.portal = renderSubtreeIntoContainer(this, ModalPortal(props), this.node); }, render: function () {