From: Jan Schneider Date: Wed, 24 Nov 2010 14:28:06 +0000 (+0100) Subject: Merge from imp.js. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c7569b5211b5b280eb36c32874e4f7cc184874f7;p=horde.git Merge from imp.js. --- diff --git a/imp/js/mobile.js b/imp/js/mobile.js index 8305e5077..9f503c134 100644 --- a/imp/js/mobile.js +++ b/imp/js/mobile.js @@ -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) {