stash
This commit is contained in:
parent
75c13e2d8b
commit
98366c8909
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ export default {
|
||||||
const div = this.$refs.text;
|
const div = this.$refs.text;
|
||||||
const range = document.createRange();
|
const range = document.createRange();
|
||||||
range.setStart(div.childNodes[0], this.selection.anchorOffset);
|
range.setStart(div.childNodes[0], this.selection.anchorOffset);
|
||||||
range.setEnd(div.childNodes[0], this.selection.focusOffset);
|
range.setEnd(div.childNodes[0], Math.min(this.selection.anchorOffset, div.childNodes[0].length));
|
||||||
this.selection.removeAllRanges();
|
this.selection.removeAllRanges();
|
||||||
this.selection.addRange(range);
|
this.selection.addRange(range);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue