Index: _source/plugins/domiterator/plugin.js =================================================================== --- _source/plugins/domiterator/plugin.js (revision 3865) +++ _source/plugins/domiterator/plugin.js Fri Jul 17 16:08:34 CST 2009 @@ -62,14 +62,14 @@ var lastNode = walker.previous(); this._.lastNode = lastNode.getNextSourceNode( true ); + // We may have an empty text node at the end of block due to [3770]. + // If that node is the lastNode, it would cause our logic to leak to the + // next block.(#3887) if ( this._.lastNode && this._.lastNode.type == CKEDITOR.NODE_TEXT && - !CKEDITOR.tools.trim( this._.lastNode.getText( ) ) ) + !CKEDITOR.tools.trim( this._.lastNode.getText( ) ) && + this._.lastNode.getParent().isBlockBoundary() ) { - // Special case for #3887: - // We may have an empty text node at the end of block due to [3770]. - // If that node is the lastNode, it would cause our logic to leak to the - // next block. var testRange = new CKEDITOR.dom.range( range.document ); testRange.moveToPosition( this._.lastNode, CKEDITOR.POSITION_AFTER_END ); if ( testRange.checkEndOfBlock() ) Index: CHANGES.html =================================================================== --- CHANGES.html (revision 3914) +++ CHANGES.html Fri Jul 17 16:10:44 CST 2009 @@ -145,6 +145,7 @@