From: skodak Date: Fri, 2 Jun 2006 17:00:22 +0000 (+0000) Subject: merged another try to fix IR from MOODEL_16_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=75d9b88f3d33e7270f02bada57ba64b903b9f201;p=moodle.git merged another try to fix IR from MOODEL_16_STABLE --- diff --git a/lib/editor/htmlarea/htmlarea.php b/lib/editor/htmlarea/htmlarea.php index ab47a482b7..62d408e7b1 100644 --- a/lib/editor/htmlarea/htmlarea.php +++ b/lib/editor/htmlarea/htmlarea.php @@ -588,9 +588,17 @@ HTMLArea.prototype.generate = function () { // it's not element but ID this._textArea = textarea = HTMLArea.getElementById("textarea", textarea); } + // Fix for IE's sticky bug. Editor doesn't load + // editing area. + var height; + if ( textarea.offsetHeight && textarea.offsetHeight > 0 ) { + height = textarea.offsetHeight; + } else { + height = 300; + } this._ta_size = { w: textarea.offsetWidth, - h: textarea.offsetHeight + h: height }; textarea.style.display = "none";