From 946564f7ff9a81fc76efdde294ab79dabf90794a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 27 Feb 2017 17:54:18 +0300 Subject: disable hotkeys/tap handling when a modal is open --- js/read.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/read.js b/js/read.js index 38b5d97..333c9b5 100644 --- a/js/read.js +++ b/js/read.js @@ -12,7 +12,10 @@ function prev_page() { function hotkey_handler(e) { try { - console.log('K:' + e.which); + //console.log('K:' + e.which); + + if ($(".modal").is(":visible")) + return; // right if (e.which == 39) { @@ -34,6 +37,10 @@ function init_taps() { window.addEventListener("mouseup", function(event) { if (event.button == 0) { + + if ($(".modal").is(":visible")) + return; + var doc = document.documentElement; var margin_x = 64; var margin_y_top = 48; -- cgit v1.2.3