JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0.2
[ckeditor.git] / _source / plugins / enterkey / plugin.js
index d171ae2..28dc244 100644 (file)
@@ -101,11 +101,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                if ( !isStartOfBlock && !isEndOfBlock )\r
                {\r
                        // If the next block is an <li> with another list tree as the first\r
-                       // child, we'll need to append a placeholder or the list item\r
+                       // child, we'll need to append a filler (<br>/NBSP) or the list item\r
                        // wouldn't be editable. (#1420)\r
-                       if ( nextBlock.is( 'li' ) && ( node = nextBlock.getFirst() )\r
-                                       && node.is && node.is( 'ul', 'ol') )\r
-                               nextBlock.insertBefore( doc.createText( '\xa0' ), node );\r
+                       if ( nextBlock.is( 'li' )\r
+                                && ( node = nextBlock.getFirst( CKEDITOR.dom.walker.invisible( true ) ) )\r
+                                && node.is && node.is( 'ul', 'ol' ) )\r
+                               ( CKEDITOR.env.ie ? doc.createText( '\xa0' ) : doc.createElement( 'br' ) ).insertBefore( node );\r
 \r
                        // Move the selection to the end block.\r
                        if ( nextBlock )\r