Changeset 1511


Ignore:
Timestamp:
02/14/2008 11:51:07 AM (7 years ago)
Author:
fredck
Message:

Fixed #1717 : The editor was entering on looping on some specific cases when dealing with invalid source markup.

Location:
FCKeditor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/_whatsnew.html

    r1510 r1511  
    9191                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1854">#1854</a>] Indentation now works inside
    9292                        table cells.</li>
     93                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1717">#1717</a>] The editor
     94                        was entering on looping on some specific cases when dealing with invalid source
     95                        markup.</li>
    9396        </ul>
    9497        <p>
  • FCKeditor/trunk/editor/_source/classes/fckdomrangeiterator.js

    r1409 r1511  
    9292                var currentNode = this._NextNode ;
    9393                var lastNode = this._LastNode ;
     94
     95                this._NextNode = null ;
    9496
    9597                while ( currentNode )
     
    129131                                        // including possibly skipped empty spaces. (#1603)
    130132                                        if ( range )
     133                                        {
    131134                                                range.SetEnd( currentNode, 3, true ) ;
     135
     136                                                // The found boundary must be set as the next one at this
     137                                                // point. (#1717)
     138                                                if ( nodeName != 'br' )
     139                                                        this._NextNode = currentNode ;
     140                                        }
    132141
    133142                                        closeRange = true ;
     
    311320                // above block can be removed or changed, so we can rely on it for the
    312321                // next interation.
    313                 this._NextNode = ( isLast || block == lastNode ) ? null : FCKDomTools.GetNextSourceNode( block, true, null, lastNode ) ;
     322                if ( !this._NextNode )
     323                        this._NextNode = ( isLast || block == lastNode ) ? null : FCKDomTools.GetNextSourceNode( block, true, null, lastNode ) ;
    314324
    315325                return block ;
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy