From fe2786c5335c1978398b89245e74ec6ee565963c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 20 Nov 2018 19:43:57 +0100 Subject: [PATCH] Fix modal resizing --- templates/standalone/modal.julius | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/standalone/modal.julius b/templates/standalone/modal.julius index 38c71f906..d80d6161f 100644 --- a/templates/standalone/modal.julius +++ b/templates/standalone/modal.julius @@ -82,7 +82,7 @@ frame.setAttribute('id', "frame-" + modal.getAttribute('id')); modal.insertBefore(frame, null); - frame.onload = function() { + var resizeFrame = function() { frame.style.visibility = 'hidden'; frame.style.height = '0'; @@ -92,11 +92,16 @@ frame.style.height = height.toPrecision() + "px"; frame.style.visibility = 'visible'; - // frame.setAttribute("scrolling", "no"); + frame.setAttribute("scrolling", "no"); doc.querySelectorAll("form").forEach(function(form) { form.setAttribute("target", "_top"); }); + }; + + frame.onload = function() { + frame.contentWindow.onresize = resizeFrame; + resizeFrame(); } var url = "";