Fix modal resizing

This commit is contained in:
Gregor Kleen 2018-11-20 19:43:57 +01:00
parent bb672c7085
commit fe2786c533

View File

@ -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 = "";