From 4378c30a15e4d5db2b321ff9cb2ec90ab227bd75 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 18 Jun 2019 21:22:43 +0300 Subject: double tap fullscreen handler: prevent clash with dictionary popup --- js/reader.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'js') 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) { -- cgit v1.2.3