Hide <object> node which causes border in IE11
This commit is contained in:
parent
6712cb4412
commit
67a3279ef7
|
@ -22,6 +22,10 @@ export default class SearchResultsTemplate extends React.Component<ISearchResult
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
|
const objectNode: any = document.querySelector("object[data='about:blank']");
|
||||||
|
if (objectNode) {
|
||||||
|
objectNode.style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
return <div ref={el => this.parentRef = el}>
|
return <div ref={el => this.parentRef = el}>
|
||||||
<div dangerouslySetInnerHTML={{ __html: this.state.processedTemplate }}></div>
|
<div dangerouslySetInnerHTML={{ __html: this.state.processedTemplate }}></div>
|
||||||
|
@ -38,7 +42,6 @@ export default class SearchResultsTemplate extends React.Component<ISearchResult
|
||||||
}
|
}
|
||||||
|
|
||||||
public componentDidUpdate() {
|
public componentDidUpdate() {
|
||||||
|
|
||||||
// Post render operations (previews on elements, etc.)
|
// Post render operations (previews on elements, etc.)
|
||||||
this.props.templateService.initPreviewElements();
|
this.props.templateService.initPreviewElements();
|
||||||
this.onComponentResize();
|
this.onComponentResize();
|
||||||
|
@ -66,7 +69,7 @@ export default class SearchResultsTemplate extends React.Component<ISearchResult
|
||||||
const nodes = document.querySelectorAll(".iframePreview, .video-js");
|
const nodes = document.querySelectorAll(".iframePreview, .video-js");
|
||||||
|
|
||||||
DomHelper.forEach(nodes, (index, elt) => {
|
DomHelper.forEach(nodes, (index, elt) => {
|
||||||
elt.style.width = Math.floor(this.parentRef.offsetWidth/2) + 'px';
|
elt.style.width = Math.floor(this.parentRef.offsetWidth / 2) + 'px';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue