Fixed bug #13007: htmlArea RTE: Toggling insertlist buttons may freeze Safari/Chrome...
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 11 Dec 2009 03:02:23 +0000 (03:02 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 11 Dec 2009 03:02:23 +0000 (03:02 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6651 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js

index 958b6b5..43a428e 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-12-10  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #13004: htmlArea RTE: buttons.table.disableEnterParagraphs not honoured in Opera
+       * Fixed bug #13007: htmlArea RTE: Toggling insertlist buttons may freeze Safari/Chrome browsers
 
 2009-12-10  Dmitry Dulepov  <dmitry.dulepov@gmail.com>
 
index 25ad9c5..c7465fc 100644 (file)
@@ -1,6 +1,7 @@
 2009-12-10  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #13004: htmlArea RTE: buttons.table.disableEnterParagraphs not honoured in Opera
+       * Fixed bug #13007: htmlArea RTE: Toggling insertlist buttons may freeze Safari/Chrome browsers
 
 2009-12-09  Stanislas Rolland  <typo3@sjbr.ca>
 
index 3367a24..35e41ad 100644 (file)
@@ -737,13 +737,15 @@ BlockElements = HTMLArea.Plugin.extend({
                        first.innerHTML = "<br />";
                        this.editor.selectNodeContents(first,true);
                } else {
+                               // parentElement may be removed by following command
+                       var parentNode = parentElement.parentNode;
                        try {
                                this.editor._doc.execCommand(buttonId, false, null);
                        } catch(e) {
                                this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");");
                        }
                        if (HTMLArea.is_safari) {
-                               this.cleanAppleSpanTags(parentElement);
+                               this.editor.cleanAppleStyleSpans(parentNode);
                        }
                }
        },
@@ -860,18 +862,6 @@ BlockElements = HTMLArea.Plugin.extend({
        },
        
        /*
-        * Clean Apple span tags
-        */
-       cleanAppleSpanTags : function(element) {
-               var spans = element.getElementsByTagName("span");
-               for (var i = spans.length; --i >= 0;) {
-                       if (HTMLArea._hasClass(spans[i], "Apple-style-span")) {
-                               this.editor.removeMarkup(spans[i]);
-                       }
-               }
-       },
-       
-       /*
         * Make XHTML-compliant nested list
         * We need this for Opera
         */