Hide <object> node which causes border in IE11

This commit is contained in:
Mikael Svenson 2018-11-08 08:09:10 +01:00
parent 6712cb4412
commit 67a3279ef7
1 changed files with 14 additions and 11 deletions

View File

@ -22,6 +22,10 @@ export default class SearchResultsTemplate extends React.Component<ISearchResult
}
public render() {
const objectNode: any = document.querySelector("object[data='about:blank']");
if (objectNode) {
objectNode.style.display = "none";
}
return <div ref={el => this.parentRef = el}>
<div dangerouslySetInnerHTML={{ __html: this.state.processedTemplate }}></div>
@ -38,7 +42,6 @@ export default class SearchResultsTemplate extends React.Component<ISearchResult
}
public componentDidUpdate() {
// Post render operations (previews on elements, etc.)
this.props.templateService.initPreviewElements();
this.onComponentResize();
@ -66,7 +69,7 @@ export default class SearchResultsTemplate extends React.Component<ISearchResult
const nodes = document.querySelectorAll(".iframePreview, .video-js");
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';
});
}
}