Ticket #3940: 3940_2.patch

File 3940_2.patch, 3.3 KB (added by Tobiasz Cudnik, 15 years ago)
  • _source/plugins/list/plugin.js

     
    418418                                                processedFlag = false,
    419419                                                blockLimit = path.blockLimit;
    420420
    421                                         // First, try to group by a list ancestor.
    422                                         for ( var i = 0 ; i < path.elements.length ; i++ )
    423                                         {
    424                                                 var element = path.elements[i];
    425                                                 if ( listNodeNames[ element.getName() ] )
    426                                                 {
    427                                                         // If we've encountered a list inside a block limit
    428                                                         // The last group object of the block limit element should
    429                                                         // no longer be valid. Since paragraphs after the list
    430                                                         // should belong to a different group of paragraphs before
    431                                                         // the list. (Bug #1309)
    432                                                         blockLimit.removeCustomData( 'list_group_object' );
     421                                        // Split list structure by table element, although allow nested lists to be handled by code below.
     422                                        if ( blockLimit.getName() == 'body' ||  block.getName() == 'li' )
     423                                        {
     424                                                // First, try to group by a list ancestor.
     425                                                for ( var i = 0 ; i < path.elements.length ; i++ )
     426                                                {
     427                                                        var element = path.elements[i];
     428
     429                                                        if ( listNodeNames[ element.getName() ] )
     430                                                        {
     431                                                                // If we've encountered a list inside a block limit
     432                                                                // The last group object of the block limit element should
     433                                                                // no longer be valid. Since paragraphs after the list
     434                                                                // should belong to a different group of paragraphs before
     435                                                                // the list. (Bug #1309)
     436                                                                blockLimit.removeCustomData( 'list_group_object' );
    433437
    434                                                         var groupObj = element.getCustomData( 'list_group_object' );
    435                                                         if ( groupObj )
    436                                                                 groupObj.contents.push( block );
    437                                                         else
    438                                                         {
    439                                                                 groupObj = { root : element, contents : [ block ] };
    440                                                                 listGroups.push( groupObj );
    441                                                                 CKEDITOR.dom.element.setMarker( database, element, 'list_group_object', groupObj );
    442                                                         }
    443                                                         processedFlag = true;
    444                                                         break;
    445                                                 }
    446                                         }
     438                                                                var groupObj = element.getCustomData( 'list_group_object' );
     439                                                                if ( groupObj )
     440                                                                        groupObj.contents.push( block );
     441                                                                else
     442                                                                {
     443                                                                        groupObj = { root : element, contents : [ block ] };
     444                                                                        listGroups.push( groupObj );
     445                                                                        CKEDITOR.dom.element.setMarker( database, element, 'list_group_object', groupObj );
     446                                                                }
     447                                                                processedFlag = true;
     448                                                                break;
     449                                                        }
     450                                                }
     451                                        }
    447452
    448453                                        if ( processedFlag )
    449454                                                continue;
  • CHANGES.html

     
    128128                <li><a href="http://dev.fckeditor.net/ticket/3839">#3839</a> : Update Scayt plugin to reflect the latest change from SpellChecker.net.</li>
    129129                <li><a href="http://dev.fckeditor.net/ticket/3742">#3742</a> : Fixed wrong dialog layout for dialogs without tab bar in IE RTL mode .</li>
    130130                <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>
     131                <li><a href="http://dev.fckeditor.net/ticket/3940">#3940</a> : Fixed list operation doesn't stop at table.</li>
    131132        </ul>
    132133        <h3>
    133134                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy