- 🇮🇳India gouthamraon
Getting Console error after applying #67 patch, Null value in "iframe.contentWindow".
We need to add a condition for this.// Resize iFrame based on content (called from iframe onload).
function resizeIframe(iframe) {
// Remove default height so we're not calculating from that.
iframe.style.height = '';
// Set height to content.
iframe.style.height = iframe.contentWindow.document.documentElement.scrollHeight + 'px';
// Periodically auto-resize as contents may change.
setInterval( function () {
if(iframe.contentWindow == null) return;
iframe.style.height = iframe.contentWindow.document.documentElement.scrollHeight + 'px';
}, 1000); - last update
about 1 year ago 56 pass - 🇦🇺Australia thtas
I've not run in to the issue from #68, but I do have a problem when uploading a large image when the browser window is not very high, resulting the modal being resized and the bottom of it gets hidden below the fold. Making the button at the submit button un-clickable. To fix it you have to re-size the window (by just a tiny amount) and the modal position is re-calculated correctly.
I've added a resize event trigger to the resizeIframe method which fixes it for my use-case, but this whole thing is pretty stinky. use at your own risk.
- 🇮🇳India dev16.addweb
Re-roll the patch #70 according to the latest code changes.
- 🇺🇸United States sonfd Portland, ME
It seems like we diverged from the original track somewhere here, starting at around #63 the patches are all much smaller and simpler, but they seem incomplete. For example, they do not adjust the configuration form with the auto-height option and they always resize the iframe regardless of which height was configured. As a result, I think the patches from the #53 -> #57 -> #62 line are more complete. I'm attaching a re-roll of that patch against the latest dev.