aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/driver.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-10-17 09:14:49 -0700
committerAlex Yatskov <alex@foosoft.net>2016-10-17 09:14:49 -0700
commitf22fcb0a5d5ef5b3003fbfabf21713bc889d0942 (patch)
treee3a2b058ad8ddf6f1897666c1d1bcf46eade9561 /ext/fg/js/driver.js
parentaa1a2b01763aab7e0880ec20f8c05bdd11e94c5d (diff)
Cleanup, reset scroll position on definition lookup (#20)
Diffstat (limited to 'ext/fg/js/driver.js')
-rw-r--r--ext/fg/js/driver.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js
index f1a0be9f..280a7dca 100644
--- a/ext/fg/js/driver.js
+++ b/ext/fg/js/driver.js
@@ -100,9 +100,11 @@ class Driver {
}
onMouseDown(e) {
+ this.lastMousePos = {x: e.clientX, y: e.clientY};
+ this.popupTimerClear();
+
if (this.popup.visible()) {
- const selection = window.getSelection();
- selection.removeAllRanges();
+ this.hidePopup();
}
}