Ticket #3887: 3887_2.patch

File 3887_2.patch, 2.0 KB (added by Martin Kou, 15 years ago)
  • _source/plugins/domiterator/plugin.js

     
    6161                                walker.evaluator = ignoreBookmarkTextEvaluator;
    6262                                var lastNode = walker.previous();
    6363                                this._.lastNode = lastNode.getNextSourceNode( true );
     64
     65                                if ( this._.lastNode.type == CKEDITOR.NODE_TEXT && /^[ \t\r\n]*$/.test( this._.lastNode.getText( ) ) )
     66                                {
     67                                        // Special case for #3887:
     68                                        // We may have an empty text node at the end of block due to [3770].
     69                                        // If that node is the lastNode, it would cause our logic to leak to the
     70                                        // next block.
     71                                        var testRange = new CKEDITOR.dom.range( range.document );
     72                                        testRange.moveToPosition( this._.lastNode, CKEDITOR.POSITION_AFTER_END );
     73                                        if ( testRange.checkEndOfBlock() )
     74                                        {
     75                                                var path = new CKEDITOR.dom.elementPath( testRange.endContainer );
     76                                                var block = path.block || path.blockLimit;
     77                                                this._.lastNode = block.getNextSourceNode( true );
     78                                        }
     79                                }
     80
    6481                                // Probably the document end is reached, we need a marker node.
    6582                                if ( !this._.lastNode )
    6683                                {
    6784                                                this._.lastNode = range.document.createText( '' );
    6885                                                this._.lastNode.insertAfter( lastNode );
    6986                                }
     87
    7088                                // Let's reuse this variable.
    7189                                range = null;
    7290                        }
  • CHANGES.html

     
    105105                        table row/column/cell menus are not useable when table cells are selected.</li>
    106106                <li><a href="http://dev.fckeditor.net/ticket/3896">#3896</a> : The editing area was
    107107                        flashing when switching forth and back to source view.</li>
     108                <li><a href="http://dev.fckeditor.net/ticket/3887">#3887</a> : Fixed an issue in which the create
     109
     110                        list command may leak outside of a selected table cell and into the rest of document.</li>
     111
    108112        </ul>
    109113        <h3>
    110114                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy