From 21bf0ecc7037c9460f9ae6091497b2d2c9b7c089 Mon Sep 17 00:00:00 2001 From: scyrma Date: Thu, 28 Feb 2008 08:14:20 +0000 Subject: [PATCH] MDL-12726 - Making the htmlarea width default to 598 if it's null, don't touch it otherwise (merge from 1.9) --- lib/editor/htmlarea/htmlarea.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/editor/htmlarea/htmlarea.php b/lib/editor/htmlarea/htmlarea.php index 0711b23985..83aaf533b2 100644 --- a/lib/editor/htmlarea/htmlarea.php +++ b/lib/editor/htmlarea/htmlarea.php @@ -805,7 +805,8 @@ 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 = Math.max(parseInt(width), 598); + width = (width == 0 ? 598 : width); + //width = Math.max(parseInt(width), 598); width = String(width); if (width.match(/^\d+$/)) { // is this a pure int? if so, let it be in px, and remove 2px -- 2.39.5