Ticket #6744: 6744.patch

File 6744.patch, 1000 bytes (added by Garry Yao, 13 years ago)
  • _source/core/dom/range.js

     
    268268        // check(Start|End)OfBlock.
    269269        function getCheckStartEndBlockEvalFunction( isStart )
    270270        {
    271                 var hadBr = false, bookmarkEvaluator = CKEDITOR.dom.walker.bookmark( true );
     271                var hadBr = false,
     272                        bookmarkEvaluator = CKEDITOR.dom.walker.bookmark( true ),
     273                        noneWhitespaces = CKEDITOR.dom.walker.whitespaces( 1 );
    272274                return function( node )
    273275                {
    274276                        // First ignore bookmark nodes.
     
    289291                                {
    290292                                        // If we're working at the end-of-block, forgive the first <br /> in non-IE
    291293                                        // browsers.
    292                                         if ( !isStart && !CKEDITOR.env.ie && node.getName() == 'br' && !hadBr )
     294                                        if ( !CKEDITOR.env.ie && node.getName() == 'br'
     295                                                        && !hadBr && ( !isStart || node.getNext( noneWhitespaces ) ) )
    293296                                                hadBr = true;
    294297                                        else
    295298                                                return false;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy