JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2.2
[ckeditor.git] / _source / plugins / indent / plugin.js
index d61e6a6..d175e46 100644 (file)
@@ -11,6 +11,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 {\r
        var listNodeNames = { ol : 1, ul : 1 };\r
 \r
+       var isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ),\r
+               isNotBookmark = CKEDITOR.dom.walker.bookmark( false, true );\r
+\r
        function setState( editor, state )\r
        {\r
                editor.getCommand( this.name ).setState( state );\r
@@ -187,6 +190,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                           followingList.is &&\r
                                           followingList.getName() in listNodeNames )\r
                                {\r
+                                       // IE requires a filler NBSP for nested list inside empty list item,\r
+                                       // otherwise the list item will be inaccessiable. (#4476)\r
+                                       if ( CKEDITOR.env.ie && !li.getFirst( function( node ){ return isNotWhitespaces( node ) && isNotBookmark( node ); } ) )\r
+                                               li.append( range.document.createText( '\u00a0' ) );\r
+\r
                                        li.append( followingList );\r
                                }\r
 \r