Fix iframe resizing bug

This commit is contained in:
Dennis Eichhorn 2020-12-19 20:32:24 +01:00
parent f5a4aaa850
commit 98004844f2

View File

@ -98,7 +98,10 @@ export class GeneralUI
const length = e.length;
for (let i = 0; i < length; ++i) {
e[i].height = e[i].contentWindow.document.body.scrollHeight + 25;
if (e[i].contentWindow.document.body !== null) {
e[i].height = e[i].contentWindow.document.body.scrollHeight + 25;
}
e[i].addEventListener('load', function() {
this.height = this.contentWindow.document.body.scrollHeight + 25;
});