Ticket #8812: 8812.patch

File 8812.patch, 793 bytes (added by Frederico Caldeira Knabben, 13 years ago)
  • _source/core/dom/range.js

     
    788788
    789789                        if ( container.type != CKEDITOR.NODE_ELEMENT )
    790790                        {
    791                                 if ( !offset )
     791                                if ( !offset || container.type != CKEDITOR.NODE_TEXT )  // #8812
    792792                                        this.setStartBefore( container );
    793793                                else if ( offset >= container.getLength() )
    794794                                        this.setStartAfter( container );
     
    801801                        {
    802802                                if ( !offset )
    803803                                        this.setEndBefore( container );
    804                                 else if ( offset >= container.getLength() )
     804                                else if ( container.type != CKEDITOR.NODE_ELEMENT || offset >= container.getLength() )  // #8812
    805805                                        this.setEndAfter( container );
    806806                        }
    807807                },
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy