Ticket #3782: 3782_2.patch

File 3782_2.patch, 2.8 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/list/plugin.js

     
    116116                                        for ( i = 0 ; i < item.contents.length ; i++ )
    117117                                                currentListItem.append( item.contents[i].clone( true, true ) );
    118118
    119                                         if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT )
     119                                        if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT
     120                                                 && currentIndex != listArray.length - 1 )
    120121                                        {
    121122                                                if ( currentListItem.getLast()
    122123                                                                && currentListItem.getLast().type == CKEDITOR.NODE_ELEMENT
     
    344345                         && !( previousNode.is && previousNode.isBlockBoundary( { br : 1 } ) ) )
    345346                        editor.document.createElement( 'br' ).insertBefore( firstNode );
    346347
    347                 // If groupObj.root is the last element in its parent, or its nextSibling is a <br>, then we should
    348                 // not add a <br> after the final item. So, check for the cases and trim the <br>.
    349                 if ( !groupObj.root.getNext() || groupObj.root.getNext().$.nodeName.toLowerCase() == 'br' )
    350                 {
    351                         if ( newList.listNode.getLast().$.nodeName.toLowerCase() == 'br' )
    352                                 newList.listNode.getLast().remove();
    353                 }
     348                var rootParent = groupObj.root.getParent();
    354349                docFragment.replace( groupObj.root );
     350                // The list content might be empty.(#3782)
     351                if( !CKEDITOR.env.ie && rootParent )
     352                        rootParent.appendBogus();
    355353        }
    356354
    357355        function listCommand( name, type )
  • CHANGES.html

     
    131131                <li><a href="http://dev.fckeditor.net/ticket/3671">#3671</a> : Fixed body fixing should be applied to the real type under fake elements.</li>
    132132                <li><a href="http://dev.fckeditor.net/ticket/3836">#3836</a> : Fixed remove list in enterMode=BR will merge sibling text to one line.</li>
    133133                <li><a href="http://dev.fckeditor.net/ticket/3949">#3949</a> : Fixed enterKey within pre-formatted text introduce wrong line-break.</li>
    134                 <li><a href="http://dev.fckeditor.net/ticket/3878">#3878</a> : Whenever possible,
    135                         dialogs will not present scrollbars if the content is too big for its standard
    136                         size.</li>
     134                <li><a href="http://dev.fckeditor.net/ticket/3878">#3878</a> : Whenever possible,
     135                dialogs will not present scrollbars if the content is too big for its standard
     136                size.</li>
     137                <li><a href="http://dev.fckeditor.net/ticket/3782">#3782</a> : Remove empty list in table cell result in collapsed cell.</li>
    137138                <li>Updated the following language files:<ul>
    138139                        <li><a href="http://dev.fckeditor.net/ticket/3837">#3837</a> : Brazilian Portuguese.</li>
    139                         </ul>
     140                </ul>
    140141                </li>
    141142        </ul>
    142143        <h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy