summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-06-18 21:22:43 +0300
committerAndrew Dolgov <[email protected]>2019-06-18 21:22:43 +0300
commit4378c30a15e4d5db2b321ff9cb2ec90ab227bd75 (patch)
tree32184ed3a696132b79a7f002241426ac023871f9 /js
parent922d399dd0eac223c9f81c2696ca164a93cf53c2 (diff)
double tap fullscreen handler: prevent clash with dictionary popup
Diffstat (limited to 'js')
-rw-r--r--js/reader.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/reader.js b/js/reader.js
index bc4db56..cfb16a8 100644
--- a/js/reader.js
+++ b/js/reader.js
@@ -14,8 +14,13 @@ function enable_swipes() {
$(document).ready(function() {
- $(window).on("doubletap", function(evt) {
- parent.toggle_fullscreen();
+ $(window).on("doubletap", function(/* evt */) {
+
+ const sel = getSelection().toString().trim();
+
+ if (!sel.match(/^\w+$/)) {
+ parent.toggle_fullscreen();
+ }
});
$(window).on("click tap", function(evt) {