mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Fix to resize iframe if called by some elements from inside
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user