From: Michael M Slusarz Date: Tue, 20 Oct 2009 18:18:57 +0000 (-0600) Subject: A bit longer delay seems to work better X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e56a9d8e6de5bb3ece91f9be90e4916c40ec875b;p=horde.git A bit longer delay seems to work better --- diff --git a/imp/js/imp.js b/imp/js/imp.js index 614c6e28c..eb2ca93e7 100644 --- a/imp/js/imp.js +++ b/imp/js/imp.js @@ -97,15 +97,15 @@ document.observe('dom:loaded', function() { this.iframeResize(id); }; - IMP.iframeResize = function(id, defer) + IMP.iframeResize = function(id, delay) { id = $(id); id.setStyle({ height: Math.max(id.contentWindow.document.body.scrollHeight, id.contentWindow.document.lastChild.scrollHeight) + 'px' }); - if (!defer) { + if (!delay) { // For whatever reason, browsers will report different heights - // after the initial height setting. Deferring a second height + // after the initial height setting. Delaying a second height // setting seems to work most of the time to fix this. - this.iframeResize.bind(this, id, true).defer(); + this.iframeResize.bind(this, id, true).delay(0.5); } };