Fixing selection bug
This commit is contained in:
parent
7f661fdd81
commit
b421b435fa
@ -118,10 +118,6 @@ class Client {
|
||||
this.popup.showNextTo(range.getRect(), content);
|
||||
|
||||
if (this.options.highlightText) {
|
||||
if (this.lastRange !== null) {
|
||||
this.lastRange.deselect();
|
||||
}
|
||||
|
||||
range.select();
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,7 @@ class Range {
|
||||
|
||||
select() {
|
||||
const selection = window.getSelection();
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(this.rng);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user