We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c763b4 commit 0622d08Copy full SHA for 0622d08
1 file changed
src/FadeMixin.js
@@ -41,10 +41,11 @@ module.exports = {
41
},
42
43
componentWillUnmount: function () {
44
- var els = this.getDOMNode().querySelectorAll('.fade');
+ var els = this.getDOMNode().querySelectorAll('.fade'),
45
+ container = (this.props.container && this.props.container.getDOMNode()) || document.body;
46
if (els.length) {
47
this._fadeOutEl = document.createElement('div');
- document.body.appendChild(this._fadeOutEl);
48
+ container.appendChild(this._fadeOutEl);
49
this._fadeOutEl.appendChild(this.getDOMNode().cloneNode(true));
50
// Firefox needs delay for transition to be triggered
51
setTimeout(this._fadeOut, 20);
0 commit comments