Ticket #7448: 7448.patch
File 7448.patch, 1.2 KB (added by , 13 years ago) |
---|
-
_source/plugins/list/plugin.js
464 464 this.type = type; 465 465 } 466 466 467 // Move direction attribute from root to list items. 468 function dirToListItems( list ) 469 { 470 var dir = list.getDirection(); 471 if ( dir ) 472 { 473 for ( var i = 0, children = list.getChildren(), child; child = children.getItem( i ), i < children.count(); i++ ) 474 { 475 if ( child.type == CKEDITOR.NODE_ELEMENT && child.is( 'li' ) && !child.getDirection() ) 476 child.setAttribute( 'dir', dir ); 477 } 478 479 list.removeAttribute( 'dir' ); 480 } 481 } 482 467 483 listCommand.prototype = { 468 484 exec : function( editor ) 469 485 { … … 617 633 if ( sibling && sibling.getName && 618 634 sibling.getName() == listCommand.type ) 619 635 { 636 637 // In case to be merged lists have difference directions. (#7448) 638 if ( sibling.getDirection( 1 ) != listNode.getDirection( 1 ) ) 639 dirToListItems( listNode.getDirection() ? listNode : sibling ); 640 620 641 sibling.remove(); 621 642 // Move children order by merge direction.(#3820) 622 643 sibling.moveChildren( listNode, rtl );