Ticket #8592: Fix resizing height
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 28 Sep 2009 04:04:35 +0000 (22:04 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 28 Sep 2009 04:04:35 +0000 (22:04 -0600)
imp/js/imp.js

index 9843cf5..4076e39 100644 (file)
@@ -61,6 +61,8 @@ document.observe('dom:loaded', function() {
         });
 
         e.stop();
+
+        this.iframeResize.bind(this, iframe.readAttribute('id')).defer();
     };
 
     IMP.iframeInject = function(id, data)
@@ -78,7 +80,7 @@ document.observe('dom:loaded', function() {
     IMP.iframeResize = function(id)
     {
         id = $(id);
-        id.setStyle({ height: id.contentWindow.document.height + 'px' });
+        id.setStyle({ height: id.contentWindow.document.body.scrollHeight + 'px' });
     };
 
     // If menu is present, attach event handlers to folder switcher.