aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/range.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-04-24 11:31:55 -0700
committerAlex Yatskov <alex@foosoft.net>2016-04-24 11:31:55 -0700
commitb421b435fad14f1cf4f644a8e64e1d2e5c6184cd (patch)
tree0d34c13b658f892c4314778510a6d78180e1a5ba /ext/fg/js/range.js
parent7f661fdd813ff1b792758f3e9450e99eae5b3827 (diff)
Fixing selection bug
Diffstat (limited to 'ext/fg/js/range.js')
-rw-r--r--ext/fg/js/range.js1
1 files changed, 1 insertions, 0 deletions
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);
}