[BUGFIX] htmlArea RTE: Firefox may report error when setting a color
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 3 Feb 2012 00:36:20 +0000 (19:36 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 3 Feb 2012 00:36:51 +0000 (01:36 +0100)
Problem: The color does get assigned, but Firefox reports a JS error.
Solution: The RTE may incorrectly detach the selection range.

Change-Id: Ief034d8d97894c44160487f353523bf83f688c7c
Resolves: #33644
Releases: 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/8817
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/typo3color.js

index 0d6aa9b..9720db7 100644 (file)
@@ -397,9 +397,6 @@ HTMLArea.TYPO3Color = HTMLArea.Plugin.extend({
                        element.style[this.styleProperty[buttonId]] = color;
                        this.editor.wrapWithInlineElement(element, selection, range);
                }
-               if (!Ext.isIE) {
-                       range.detach();
-               }
                this.close();
                event.stopEvent();
        },