Fix to resize iframe if called by some elements from inside

This commit is contained in:
Ilia Ross
2024-06-09 01:53:36 +03:00
parent adb3d0bb67
commit ba3be31335

View File

@@ -2979,6 +2979,13 @@ my $iframe_body = <<EOF;
} catch (e) {}
})();
});
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
iframeDoc.addEventListener('click', function(event) {
if (event.target.tagName.toLowerCase() === 'summary' &&
event.target.dataset.resize === 'iframe') {
setTimeout(iframe_resize);
}
});
}, 99);
}
</script>