Repository: miniflux/v2 (language: go)

Issue:
Remove double tap navigation
In the last weeks i had a lot of unwanted navigations when double-taping to zoom an image or trying to click a tiny link.

Only today I realized that there is some double tap feature causing this confusion. I would vote to remove double tapping and replace it with horizontal swipe.

Related to https://github.com/miniflux/miniflux/pull/341


Discussion / hints:
I vote for keeping the double tap, it leads to less unwanted navigation than horizontal swipes.
I have the same bad user experience, I have a lot of accidental next post navigation due this strange behavior, and it's annoying because I'm marking some posts as readed when they are not... What about making this behavior configurable via settings?
Ahhh, _this_ is what causes it! I was about to file a bug report due to quite frequent unwanted navigations. I assumed it was triggered by sideways swipe (which I also do _not_ want), but couldn't reproduce. So I spent some time this morning and found that double tapping in the middle of a post navigates away from it. That helped me find this issue.

I strongly vote to remove this feature, and otherwise make it opt-in or bundle it with the current config for swipe on mobile. Double tapping content to navigate away from it is counter-intuitive and I haven't seen it anywhere else.
Furthermore, there seems to be a bug in the [custom implementation of double click detection](https://github.com/miniflux/v2/blob/780c9e36962b79ec722573a9ac771211b2e6699f/ui/static/js/touch_handler.js#L107). I can trigger double-tap-navigation by pinching-and-zooming in either the left or right half of the post. So I'm not actually double tapping: I'm just zooming in to see details in an image or similar, and when I release the fingers, I end up navigating away from the post instead.

This is likely what I've triggered by mistake most of the time.

Edit: ~~Perhaps I should file a separate bug report for this?~~ I filed a separate bug report for this.
Can you add a settings toggle to disable *all* gestures and shortcuts beyond standard browser navigation functionality (system back button, hyperlinks, native keyboard shortcuts not created with JS)?
Sounds reasonable to me. I won't have time to do any implementation in the foreseeable future though, so I hope someone else is able to pick it up. To me, almost everything about miniflux _just works,_ but this is the one thing making for a less enjoyable experience.
FWIW I would very much like to disable this "feature", but I do like the keyboard shortcuts, like `j` for the next entry.

Fix patch:
diff --git a/locale/translations/en_US.json b/locale/translations/en_US.json
index 635489de11a..2b7212bcb93 100644
--- a/locale/translations/en_US.json
+++ b/locale/translations/en_US.json
@@ -308,7 +308,7 @@
     "form.prefs.select.alphabetical": "Alphabetical",
     "form.prefs.select.unread_count": "Unread count",
     "form.prefs.label.keyboard_shortcuts": "Enable keyboard shortcuts",
-    "form.prefs.label.entry_swipe": "Enable swipe gesture on entries on mobile",
+    "form.prefs.label.entry_swipe": "Enable swipe and double-tap gestures on entries on mobile",
     "form.prefs.label.show_reading_time": "Show estimated reading time for entries",
     "form.prefs.label.custom_css": "Custom CSS",
     "form.prefs.label.entry_order": "Entry sorting column",
diff --git a/template/templates/views/entry.html b/template/templates/views/entry.html
index da407f05945..e3930c4969f 100644
--- a/template/templates/views/entry.html
+++ b/template/templates/views/entry.html
@@ -143,7 +143,7 @@ <h1 dir="auto">
     </div>
     {{ end }}
     {{ end }}
-    <article role="article" class="entry-content" dir="auto">
+    <article role="article" class="entry-content {{ if $.user.EntrySwipe }}double-tap{{ end }}" dir="auto">
         {{ if .user }}
             {{ noescape (proxyFilter .entry.Content) }}
         {{ else }}
diff --git a/ui/static/js/touch_handler.js b/ui/static/js/touch_handler.js
index 82374e009ac..d850f19e98d 100644
--- a/ui/static/js/touch_handler.js
+++ b/ui/static/js/touch_handler.js
@@ -104,7 +104,7 @@ class TouchHandler {
         });
 
         let entryContentElement = document.querySelector(".entry-content");
-        if (entryContentElement) {
+        if (entryContentElement && entryContentElement.classList.contains('double-tap')) {
             let doubleTapTimers = {
                 previous: null,
                 next: null


Test patch: