A bit longer delay seems to work better
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 20 Oct 2009 18:18:57 +0000 (12:18 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 20 Oct 2009 22:16:29 +0000 (16:16 -0600)
imp/js/imp.js

index 614c6e2..eb2ca93 100644 (file)
@@ -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);
         }
     };