Style tag inserted in head before <link> stylesheets (on IE browsers)
maciekmp opened this issue · comments
Maciej Płusa commented
Hey,
I am using newest version of this component. It works great but I found one little issue. In my iframe I have base styles in files and few customized added to iframe via css prop. On IE style tag is the first element in head - on other browsers is after link tags.
Right now I use setTimeout to delay adding style to head but maybe someone know better solution.
renderFrame: function renderFrame() {
var frame = ReactDOM.findDOMNode(this);
this.head = frame.contentDocument.head;
this.body = frame.contentDocument.body;
this.updateStylesheets(this.props.styleSheets);
setTimeout(function(){
this.updateCss(this.props.css);
}.bind(this),0);
ReactDOM.render(this._children, this.body);
}
Wang Zuo commented
This doesnt seem like a hack to me.
Wang Zuo commented
fixed in 2.1.0