aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-25 20:01:42 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-28 17:03:42 -0400
commit6d85dae68d9820265887405666163eb19219c477 (patch)
treeb399cc4b4a0754a01958544d6c261a486556a53f /ext
parentd2644c0776c4058ec8b029650ecf911150e35993 (diff)
Fix some issues with the context menu
Diffstat (limited to 'ext')
-rw-r--r--ext/fg/js/frontend.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 9fdd9671..a963bd92 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -119,8 +119,10 @@ class Frontend {
return false;
}
- this.popupTimerClear();
- this.searchClear(true);
+ if (e.button === 0) {
+ this.popupTimerClear();
+ this.searchClear(true);
+ }
}
onMouseOut(e) {
@@ -231,6 +233,10 @@ class Frontend {
e.preventDefault(); // Disable scroll
}
+ onAuxClick(e) {
+ this.preventNextContextMenu = false;
+ }
+
onContextMenu(e) {
if (this.preventNextContextMenu) {
this.preventNextContextMenu = false;
@@ -278,6 +284,7 @@ class Frontend {
if (this.options.scanning.touchInputEnabled) {
this.addEventListener(window, 'click', this.onClick.bind(this));
+ this.addEventListener(window, 'auxclick', this.onAuxClick.bind(this));
this.addEventListener(window, 'touchstart', this.onTouchStart.bind(this));
this.addEventListener(window, 'touchend', this.onTouchEnd.bind(this));
this.addEventListener(window, 'touchcancel', this.onTouchCancel.bind(this));