Merge from imp.js.
authorJan Schneider <jan@horde.org>
Wed, 24 Nov 2010 14:28:06 +0000 (15:28 +0100)
committerJan Schneider <jan@horde.org>
Wed, 24 Nov 2010 16:02:16 +0000 (17:02 +0100)
imp/js/mobile.js

index 8305e50..9f503c1 100644 (file)
@@ -207,12 +207,17 @@ var ImpMobile = {
 
         IMP.iframeResize = function(id)
         {
-            return;
-            var lc = id.get(0).contentWindow.document.lastChild;
-            id.css('height', lc.scrollHeight + 'px' );
+            id.css('height', id.get(0).contentWindow.document.lastChild.scrollHeight + 'px' );
 
             // For whatever reason, browsers will report different heights
             // after the initial height setting.
+            window.setTimeout(function() { IMP.iframeResize2(id); }, 300);
+        };
+
+        IMP.iframeResize2 = function(id)
+        {
+            var lc = id.get(0).contentWindow.document.lastChild;
+
             // Try expanding IFRAME if we detect a scroll.
             if (lc.clientHeight != lc.scrollHeight ||
                 id.get(0).clientHeight != lc.clientHeight) {