File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -489,11 +489,13 @@ describe('Selection', function () {
489
489
const selection = new Selection ( this . wordWithWhitespace , range )
490
490
selection . save ( )
491
491
selection . restore ( )
492
+ // With rangy normalizeBoundaries the nodes are merged together again
493
+ expect ( this . wordWithWhitespace . childNodes . length ) . to . equal ( 1 )
492
494
493
495
// Select specific characters within nodes across multiple nodes
494
496
const rangeTwo = rangy . createRange ( )
495
497
rangeTwo . setStart ( this . wordWithWhitespace , 0 ) // Select first node (start)
496
- rangeTwo . setEnd ( this . wordWithWhitespace . childNodes [ 2 ] , 2 ) // Select middle of last node
498
+ rangeTwo . setEnd ( this . wordWithWhitespace . firstChild , 6 ) // Select middle of the string
497
499
const selectionTwo = new Selection ( this . wordWithWhitespace , rangeTwo )
498
500
selectionTwo . makeBold ( )
499
501
You can’t perform that action at this time.
0 commit comments