Ticket #8284: 8284.patch
File 8284.patch, 1.4 KB (added by , 13 years ago) |
---|
-
_source/plugins/list/plugin.js
16 16 bookmarks = CKEDITOR.dom.walker.bookmark(), 17 17 nonEmpty = function( node ){ return !( whitespaces( node ) || bookmarks( node ) ); }; 18 18 19 function inheritedDirection( element )19 function cleanUpDirection( element ) 20 20 { 21 var dir; 22 while ( element && !( dir = element.getDirection() ) ) 23 { 24 element = element.getParent(); 25 } 26 return dir; 27 } 28 29 function cleanUpDirection( element, rootDir ) 30 { 31 var dir; 21 var dir, parent, parentDir; 32 22 if ( dir = element.getDirection() ) 33 23 { 34 if ( dir == ( inheritedDirection( element.getParent() ) || rootDir ) ) 35 element.removeAttribute( 'dir' ); 24 parent = element.getParent(); 25 while ( parent && !( parentDir = element.getDirection() ) ) 26 parent = parent.getParent(); 27 28 dir == parentDir && element.removeAttribute( 'dir' ); 36 29 } 37 30 } 38 31 … … 238 231 239 232 // Clear redundant direction attribute specified on list items. 240 233 if ( currentNode.getName() in CKEDITOR.dtd.$listItem ) 241 cleanUpDirection( currentNode , listRoot.getDirection( 1 ));234 cleanUpDirection( currentNode ); 242 235 } 243 236 244 237 currentNode = currentNode.getNextSourceNode();