Ticket #7490: 7490.patch

File 7490.patch, 1.0 KB (added by Garry Yao, 13 years ago)
  • _source/core/dom/range.js

     
    13201320                                                                CKEDITOR.POSITION_AFTER_START :
    13211321                                                                CKEDITOR.POSITION_AFTER_END );
    13221322
     1323                                        // Avoid enlarging the range further when end boundary spans right after the BR. (#7490)
     1324                                        if ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS )
     1325                                        {
     1326                                                var theRange = this.clone();
     1327                                                walker = new CKEDITOR.dom.walker( theRange );
     1328
     1329                                                var whitespaces = CKEDITOR.dom.walker.whitespaces(),
     1330                                                        bookmark = CKEDITOR.dom.walker.bookmark();
     1331
     1332                                                walker.evaluator = function( node ) { return !whitespaces( node ) && !bookmark( node ); };
     1333                                                var previous = walker.previous();
     1334                                                if ( previous && previous.type == CKEDITOR.NODE_ELEMENT && previous.is( 'br' ) )
     1335                                                        return;
     1336                                        }
     1337
     1338
    13231339                                        // Enlarging the end boundary.
    13241340                                        walkerRange = this.clone();
    13251341                                        walkerRange.collapse();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy