diff --git a/lib/editor/htmlarea/htmlarea.php b/lib/editor/htmlarea/htmlarea.php
index c09fb203e3c..09e17d92ca4 100644
--- a/lib/editor/htmlarea/htmlarea.php
+++ b/lib/editor/htmlarea/htmlarea.php
@@ -802,13 +802,10 @@ HTMLArea.prototype.generate = function () {
width = Math.max(parseInt(width), 588);
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;