diff options
Diffstat (limited to 'ext/fg/js')
-rw-r--r-- | ext/fg/js/client.js | 4 | ||||
-rw-r--r-- | ext/fg/js/range.js | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/ext/fg/js/client.js b/ext/fg/js/client.js index bc389818..44a3b84c 100644 --- a/ext/fg/js/client.js +++ b/ext/fg/js/client.js @@ -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(); } diff --git a/ext/fg/js/range.js b/ext/fg/js/range.js index 9a98fb1a..1d6b4e0e 100644 --- a/ext/fg/js/range.js +++ b/ext/fg/js/range.js @@ -62,6 +62,7 @@ class Range { select() { const selection = window.getSelection(); + selection.removeAllRanges(); selection.addRange(this.rng); } |