[BUGFIX] htmlArea RTE: Removing class from link in IE8 won't work
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 20 Jul 2011 04:50:05 +0000 (00:50 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 20 Jul 2011 04:54:16 +0000 (06:54 +0200)
Removing a class on a link in the link dialogue works in Firefox and IE7 but not in IE8, due to IE8's new conformance to standard name for class attribute.

Change-Id: I41b5f8dc72dc1e1809cc6f45385eaae5ab973f32
Fixes: #28009
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/3427
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js

index bdc4e13..a10ef67 100644 (file)
@@ -352,10 +352,13 @@ HTMLArea.TYPO3Link = HTMLArea.Plugin.extend({
                                if (cur_class.trim()) {
                                        node.className = cur_class.trim();
                                } else { 
-                                       if (!Ext.isIE) {
+                                       if (!Ext.isOpera) {
                                                node.removeAttribute('class');
+                                               if (Ext.isIE) {
+                                                       node.removeAttribute('className');
+                                               }
                                        } else {
-                                               node.removeAttribute('className');
+                                               node.className = '';
                                        }
                                }
                                if (cur_title.trim()) {