]> git.mjollnir.org Git - moodle.git/commitdiff
wiki: fix for IE6 bug with HTMLArea, where the text area is not drawn
authormartinlanghoff <martinlanghoff>
Thu, 6 Jul 2006 05:38:53 +0000 (05:38 +0000)
committermartinlanghoff <martinlanghoff>
Thu, 6 Jul 2006 05:38:53 +0000 (05:38 +0000)
IE6 measures a page element and - sometimes - it does this before the
element is drawn, so the dimensions it finds are zero. This update sets
sensible minimum for the width.

Author: Donal McMullan <donal@catalyst.net.nz>

lib/editor/htmlarea/htmlarea.php

index 62d408e7b1137bcd21840aab861cc9ac97ad311a..9ea3292811da2f80ed539d880ead193a8f38cf60 100644 (file)
@@ -771,7 +771,7 @@ HTMLArea.prototype.generate = function () {
     var height = (this.config.height == "auto" ? (this._ta_size.h) : this.config.height);
     height = parseInt(height);
     var width = (this.config.width == "auto" ? (this._toolbar.offsetWidth) : this.config.width);
-    width = parseInt(width);
+    width = Math.max(parseInt(width), 588);
 
     if (!HTMLArea.is_ie) {
         height -= 2;