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>
357357 cloned .innerHTML = astext .innerHTML = " " ;
358358
359359 // 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++ ) {
361361 cloned .append (selection .getRangeAt (i).cloneContents ());
362362 }
363363
@@ -628,7 +628,7 @@ The most used recipes are probably:
628628
629629 // then apply Range methods to selection.getRangeAt(0)
630630 // 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++) {
632632 cloned.append(selection.getRangeAt(i).cloneContents());
633633 }
634634 ```
You can’t perform that action at this time.
0 commit comments