Ticket #5117: 5117.patch

File 5117.patch, 946 bytes (added by Garry Yao, 14 years ago)
  • _source/core/dom/range.js

     
    744744                                        startContainer = startContainer.getParent();
    745745
    746746                                        // Check all necessity of updating the end boundary.
    747                                         if( collapsed )
    748                                                 this.collapse( true );
    749                                         else if ( this.startContainer.equals( this.endContainer ) )
     747                                        if ( this.startContainer.equals( this.endContainer ) )
    750748                                                this.setEnd( nextText, this.endOffset - this.startOffset );
    751749                                        else if ( startContainer.equals( this.endContainer ) )
    752750                                                this.endOffset += 1;
     
    755753                                this.setStart( startContainer, startOffset );
    756754
    757755                                if ( collapsed )
     756                                {
     757                                        this.collapse( true );
    758758                                        return;
    759                         }
     759                                }
     760                        }
    760761
    761762                        var endContainer = this.endContainer;
    762763                        var endOffset = this.endOffset;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy