From 8c80cc173809143c1ada0c0a5639d7c0c5417b7c Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 14 Nov 2007 01:25:20 +0000 Subject: [PATCH] htmlarea: fix in FF - MDL-11242 The previous fix for IE left some problems in the FF side of things because we were trying additions/substractions on width once its had turned to a string of value + unit. Do the math before we attach 'px' to it... --- lib/editor/htmlarea/htmlarea.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/editor/htmlarea/htmlarea.php b/lib/editor/htmlarea/htmlarea.php index 0e682a3381..5620145879 100644 --- a/lib/editor/htmlarea/htmlarea.php +++ b/lib/editor/htmlarea/htmlarea.php @@ -808,13 +808,10 @@ HTMLArea.prototype.generate = function () { // 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 - width=width+"px"; - } - - if (!HTMLArea.is_ie) { + if (width.match(/^\d+$/)) { // is this a pure int? if so, let it be in px, and remove 2px height -= 2; - width -= 2; + width -= 2; + width=width+"px"; } iframe.style.width = width; -- 2.39.5