Skip to content

Commit

Permalink
Merge pull request reactjs#85 from miracle2k/master
Browse files Browse the repository at this point in the history
Use renderSubtreeIntoContainer to keep context.
  • Loading branch information
mzabriskie committed Oct 19, 2015
2 parents c7153d1 + 5c59b9f commit cd4dd21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 : {};

Expand Down Expand Up @@ -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 () {
Expand Down

0 comments on commit cd4dd21

Please sign in to comment.