summaryrefslogtreecommitdiff
path: root/ext/fg/js/range.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-04-23 21:09:33 -0700
committerAlex Yatskov <alex@foosoft.net>2016-04-23 21:09:33 -0700
commitdefe4e5759354178c8a16d9df0bee0817abae99b (patch)
tree29a0f117301f8be6dbfcc1755e340a6655426856 /ext/fg/js/range.js
parent8b097221db06cd9119acc405ec84794362899086 (diff)
WIP
Diffstat (limited to 'ext/fg/js/range.js')
-rw-r--r--ext/fg/js/range.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/range.js b/ext/fg/js/range.js
index 473cc449..a5c38e39 100644
--- a/ext/fg/js/range.js
+++ b/ext/fg/js/range.js
@@ -67,10 +67,10 @@ class Range {
deselect() {
const selection = window.getSelection();
- selection.removeRange(this.range);
+ selection.removeAllRanges();
}
- equalTo(range) {
+ equals(range) {
const equal =
range.compareBoundaryPoints(Range.END_TO_END, this.range) === 0 &&
range.compareBoundaryPoints(Range.START_TO_START, this.range) === 0;