summaryrefslogtreecommitdiff
path: root/js/read.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-02-27 17:54:18 +0300
committerAndrew Dolgov <[email protected]>2017-02-27 17:54:18 +0300
commit946564f7ff9a81fc76efdde294ab79dabf90794a (patch)
tree1106590f41ed7522c34ccfd58e06520ba73f0341 /js/read.js
parentafa6da9f6cbfb3e90c9a252bba759c3a3c74fcbd (diff)
disable hotkeys/tap handling when a modal is open
Diffstat (limited to 'js/read.js')
-rw-r--r--js/read.js9
1 files changed, 8 insertions, 1 deletions
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;