diff options
author | Andrew Dolgov <[email protected]> | 2017-02-27 17:54:18 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-02-27 17:54:18 +0300 |
commit | 946564f7ff9a81fc76efdde294ab79dabf90794a (patch) | |
tree | 1106590f41ed7522c34ccfd58e06520ba73f0341 /js/read.js | |
parent | afa6da9f6cbfb3e90c9a252bba759c3a3c74fcbd (diff) |
disable hotkeys/tap handling when a modal is open
Diffstat (limited to 'js/read.js')
-rw-r--r-- | js/read.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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; |