iFrames do not know the required height.
In https://github.com/iChristGit/OpenWebui-Tools/issues/3 is was advised to allow iFrame same origin. Although the issue can also be resolved by appending the below code snippet. OpenWebUI recommends this solution over allowing same origin as documented here: https://docs.openwebui.com/features/extensibility/plugin/development/rich-ui/#postmessage-height-reporting-recommended
<script>
function reportHeight() {
const h = document.documentElement.scrollHeight;
parent.postMessage({ type: 'iframe:height', height: h }, '*');
}
window.addEventListener('load', reportHeight);
// Also re-report when content changes size
new ResizeObserver(reportHeight).observe(document.body);
</script>
Is there a reason this hasn't been done? Otherwise I'm willing to get a PR ready that adds this to most modules.
Hey. welcome to submit PRs I am not sure all tools can work this way tho.. (jellyfin, comfyui with tailscale) but most tools can
Merged and will update it to OpenWebui.com as well. Thank you