Follow-up to issue #10834: htmlArea RTE: IE8 now uses standard name for DOM class...
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 6 Apr 2009 14:26:35 +0000 (14:26 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Mon, 6 Apr 2009 14:26:35 +0000 (14:26 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5291 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/default-clean.js

index 101cc6a..fe6e918 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-06  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Follow-up to issue #10834: htmlArea RTE: IE8 now uses standard name for DOM class attribute
+
 2009-04-06  Oliver Hader  <oliver@typo3.org>
 
        * Follow-up to feature #9703: Admin panel cannot not be dragged
index a6206ed..754f272 100644 (file)
@@ -1,3 +1,7 @@
+2009-04-06  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Follow-up to issue #10834: htmlArea RTE: IE8 now uses standard name for DOM class attribute
+
 2009-04-05  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Follow-up to issue #10834: htmlArea RTE: IE8 now uses standard name for DOM class attribute
index e9fa2a2..da924c8 100644 (file)
@@ -97,7 +97,16 @@ DefaultClean = HTMLArea.Plugin.extend({
                        var newc = node.className.replace(/(^|\s)mso.*?(\s|$)/ig,' ');
                        if(newc != node.className) {
                                node.className = newc;
-                               if(!/\S/.test(node.className)) node.removeAttribute("className");
+                               if(!/\S/.test(node.className)) {
+                                       if (!HTMLArea.is_opera) {
+                                               node.removeAttribute("class");
+                                               if (HTMLArea.is_ie) {
+                                                       node.removeAttribute("className");
+                                               }
+                                       } else {
+                                               node.className = '';
+                                       }
+                               }
                        }
                }
                function clearStyle(node) {