Fixed bug #12622: htmlArea RTE: Incorrect behaviour of last item of list in gecko...
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 17 Nov 2009 01:55:26 +0000 (01:55 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 17 Nov 2009 01:55:26 +0000 (01:55 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6442 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js

index 604003a..dce93be 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-11-16  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #12619: htmlArea RTE: JS error raised by spell checker
+       * Fixed bug #12622: htmlArea RTE: Incorrect behaviour of last item of list in gecko browsers
 
 2009-11-16  Christian Kuhn  <lolli@schwarzbu.ch>
 
index c1f2337..810559e 100644 (file)
@@ -1,6 +1,7 @@
 2009-11-16  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #12619: htmlArea RTE: JS error raised by spell checker
+       * Fixed bug #12622: htmlArea RTE: Incorrect behaviour of last item of list in gecko browsers
 
 2009-11-15  Stanislas Rolland  <typo3@sjbr.ca>
 
index c3028db..cb69043 100644 (file)
@@ -689,13 +689,13 @@ HTMLArea.prototype._checkInsertP = function() {
                                if (!HTMLArea.is_opera) {
                                        p.innerHTML = "<br />";
                                }
-                       }
-                       if(/^li$/i.test(p.nodeName) && left_empty && !block.nextSibling) {
-                               left = block.parentNode;
-                               left.removeChild(block);
-                               range.setEndAfter(left);
-                               range.collapse(false);
-                               p = this.convertNode(p, /^(li|dd|td|th)$/i.test(left.parentNode.nodeName) ? "br" : "p");
+                               if(/^li$/i.test(p.nodeName) && left_empty && !block.nextSibling) {
+                                       left = block.parentNode;
+                                       left.removeChild(block);
+                                       range.setEndAfter(left);
+                                       range.collapse(false);
+                                       p = this.convertNode(p, /^(li|dd|td|th)$/i.test(left.parentNode.nodeName) ? "br" : "p");
+                               }
                        }
                        range.insertNode(df);
                                // Remove any anchor created empty