File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
2-ui/99-ui-misc/02-selection-range Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ As text: <span id="astext"></span>
357
357
cloned .innerHTML = astext .innerHTML = " " ;
358
358
359
359
// Clone DOM nodes from ranges (we support multiselect here)
360
- for (let i = 0 ; i < selection; i++ ) {
360
+ for (let i = 0 ; i < selection . rangeCount ; i++ ) {
361
361
cloned .append (selection .getRangeAt (i).cloneContents ());
362
362
}
363
363
@@ -628,7 +628,7 @@ The most used recipes are probably:
628
628
629
629
// then apply Range methods to selection.getRangeAt(0)
630
630
// or, like here, to all ranges to support multi-select
631
- for (let i = 0; i < selection; i++) {
631
+ for (let i = 0; i < selection.rangeCount ; i++) {
632
632
cloned.append(selection.getRangeAt(i).cloneContents());
633
633
}
634
634
```
You can’t perform that action at this time.
0 commit comments