summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-03-28 20:01:53 -0700
committerAlex Yatskov <alex@foosoft.net>2016-03-28 20:01:53 -0700
commit98170a71ed1e6ab937cc1a6958d5651d90a9483c (patch)
treebc5fd5c6762efeeff0d018b5162a9b5921ebde30 /ext
parentbaec1dd58a8bd1bc1816e2cb2340cbd6587da271 (diff)
Hide popup on scroll and resize
Diffstat (limited to 'ext')
-rw-r--r--ext/client.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/client.js b/ext/client.js
index 6d082909..5dc7e7f3 100644
--- a/ext/client.js
+++ b/ext/client.js
@@ -30,6 +30,8 @@ class Client {
window.addEventListener('mousedown', this.onMouseDown.bind(this));
window.addEventListener('mousemove', this.onMouseMove.bind(this));
window.addEventListener('keydown', this.onKeyDown.bind(this));
+ window.addEventListener('scroll', (e) => this.hidePopup());
+ window.addEventListener('resize', (e) => this.hidePopup());
this.popup.mousedown((e) => e.stopPropagation());
this.popup.scroll((e) => e.stopPropagation());