I've been tearing out my hair over this one... Maybe someone can help? The height of an embedded web app on my site looks as expected on Safari (calculated height as 992px), but in Chrome, the iframe containing the webapp calculates the height as 150px, which is "incorrect".
The height for the IFRAME should be computed using a simple code using Javascript, as referenced elsewhere on StackExchange:
<script language="javascript" type="text/javascript">
function resizeIframe(obj) {
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
}
</script>
<iframe class="embed-blast" src="http://example.com/mywebapp" scrolling="no" onload="resizeIframe(this)" ></iframe>
I've tried using jQuery, and a variety of other scripts, none of which seem to fix the underlying issue.
What I'd like is to size the IFRAME to the full content size (as occurs in Safari already) in Chrome. I've tried looking for any description of this behavior, but haven't been able to find it. Not sure if this is a "bug" or expected behavior-- not having much familiarity with JavaScript or IFRAMEs, I'm completely vexed.
Is anyone aware of this issue and a potential workaround? Many thanks in advance.