Ticket #5911: 5911.patch

File 5911.patch, 1.1 KB (added by Tobiasz Cudnik, 14 years ago)
  • _source/plugins/list/plugin.js

     
    280280
    281281                // Insert the list to the DOM tree.
    282282                var insertAnchor = listContents[ listContents.length - 1 ].getNext(),
    283                         listNode = doc.createElement( this.type );
     283                        listNode = doc.createElement( this.type ),
     284                        dir;
    284285
    285286                listsCreated.push( listNode );
    286287                while ( listContents.length )
     
    293294                                contentBlock.appendTo( listItem );
    294295                        else
    295296                        {
     297                                if ( contentBlock.hasAttribute( 'dir' ) )
     298                                {
     299                                        dir = dir || contentBlock.getAttribute( 'dir' );
     300                                        contentBlock.removeAttribute( 'dir' );
     301                                }
    296302                                contentBlock.copyAttributes( listItem );
    297303                                contentBlock.moveChildren( listItem );
    298304                                contentBlock.remove();
     
    304310                        if ( !CKEDITOR.env.ie )
    305311                                listItem.appendBogus();
    306312                }
     313
     314                if ( dir )
     315                        listNode.setAttribute( 'dir', dir );
     316
    307317                if ( insertAnchor )
    308318                        listNode.insertBefore( insertAnchor );
    309319                else
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy