Ticket #6297: 6297.patch

File 6297.patch, 2.8 KB (added by Martin, 14 years ago)
  • _source/plugins/domiterator/plugin.js

     
    1 /*
     1/*
    22Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
    33For licensing, see LICENSE.html or http://ckeditor.com/license
    44*/
     
    126126                                {
    127127                                        var nodeName = currentNode.getName();
    128128
    129                                         if ( currentNode.isBlockBoundary( this.forceBrBreak &&
    130                                                         !parentPre && { br : 1 } ) )
     129                                        if((( CKEDITOR.env.gecko || CKEDITOR.env.webkit || CKEDITOR.env.opera ) &&  blockTag == 'li' &&
     130                                                        ( currentNode.getStyle( 'display' ) == 'block' || currentNode.getStyle( 'float' ) != '' )) ||
     131                                                        !( currentNode.isBlockBoundary( this.forceBrBreak &&    !parentPre && { br : 1 } ))     )
    131132                                        {
     133                                                // If we have child nodes, let's check them.
     134                                                if ( currentNode.getFirst() )
     135                                                {
     136                                                        // If we don't have a range yet, let's start it.
     137                                                        if ( !range )
     138                                                        {
     139                                                                range = new CKEDITOR.dom.range( this.range.document );
     140                                                                range.setStartAt( currentNode, CKEDITOR.POSITION_BEFORE_START );
     141                                                        }
     142
     143                                                        currentNode = currentNode.getFirst();
     144                                                        continue;
     145                                                }
     146                                                includeNode = true;
     147                                        }
     148                                        else
     149                                        {
    132150                                                // <br> boundaries must be part of the range. It will
    133151                                                // happen only if ForceBrBreak.
    134152                                                if ( nodeName == 'br' )
     
    156174
    157175                                                closeRange = true;
    158176                                        }
    159                                         else
    160                                         {
    161                                                 // If we have child nodes, let's check them.
    162                                                 if ( currentNode.getFirst() )
    163                                                 {
    164                                                         // If we don't have a range yet, let's start it.
    165                                                         if ( !range )
    166                                                         {
    167                                                                 range = new CKEDITOR.dom.range( this.range.document );
    168                                                                 range.setStartAt( currentNode, CKEDITOR.POSITION_BEFORE_START );
    169                                                         }
    170 
    171                                                         currentNode = currentNode.getFirst();
    172                                                         continue;
    173                                                 }
    174                                                 includeNode = true;
    175                                         }
    176                                 }
     177                                }
    177178                                else if ( currentNode.type == CKEDITOR.NODE_TEXT )
    178179                                {
    179180                                        // Ignore normal whitespaces (i.e. not including &nbsp; or
  • _source/plugins/list/plugin.js

     
    1 ?/*
     1/*
    22Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
    33For licensing, see LICENSE.html or http://ckeditor.com/license
    44*/
     
    471471
    472472                                iterator.forceBrBreak = ( this.state == CKEDITOR.TRISTATE_OFF );
    473473
    474                                 while ( ( block = iterator.getNextParagraph() ) )
     474                                while ( ( block = iterator.getNextParagraph('li') ) )
    475475                                {
    476476                                        // Avoid duplicate blocks get processed across ranges.
    477477                                        if( block.getCustomData( 'list_block' ) )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy