-
-
Notifications
You must be signed in to change notification settings - Fork 801
Description
Context:
Swipe gestures (back/forward navigation) can be unintentionally triggered on trackpads and touch devices (testet on mac). It seems like it was a feature in past, but i couldn't find the comment again.
Several related issues discuss this behavior (in comments):
-
Add better page forward/back gestures
- Collaborator PalmerAL on Feb 29, 2020:
Hmm, OK. I'm not seeing any way to detect the trackpad sensitivity to compensate for this; if it's a common issue, we could probably add a setting to manually adjust the amount of movement required, but it sounds like it would be fine to leave it as-is for now.
-
Trackpad gestures are too sensitive
- strindhaug on May 22, 2024:
Option to disable this misfeature is really needed! [...]
-
Indicator showing when page is about to go to previous page
- strindhaug on May 22, 2024:
Still ridiculously sensitive on Mac touchpad [...]
-
IanDLacy on Feb 3, 2022:
Is there a way to disable this behavior entirely?
Proposal:
Introduce a user setting to disable swipe gestures. This gives users who don’t want gesture navigation a simple opt-out.
Implementation sketch:
-
webviewGestures.js line 91
Current guard:if (isInFrame) { return }
Suggested change:
if (isInFrame || isSwipeSettingDisabled) { return }
-
index.html (Settings UI, maybe placed below the autoplay toggle):
<div class="setting-section" id="section-disable-swipe"> <input type="checkbox" id="checkbox-disable-swipe" /> <label for="checkbox-disable-swipe" data-string="settingsDisableSwipeGestures" > Disable swipe gestures for navigating backward and forward </label> </div>
-
settings.js
Add after the autoplay setting some sort of event listener. I don't now how, e.g./* swipe gestures disable setting */ settings.get('disableSwipeGestures', function (value) { disableSwipeCheckbox.checked = !!value }) disableSwipeCheckbox.addEventListener('change', function () { settings.set('disableSwipeGestures', this.checked) })
UX copy:
“Disable swipe gestures for navigating backward and forward”.
This is a good-faith suggestion aimed at improving usability. I noticed there are many comments scattered across related issues, but no dedicated thread, so I created this one. Related topics include user feedback about backward/forward navigation and requests for sensitivity adjustments. I’m happy to adapt the naming, placement, or wording to match project conventions, and I fully understand if the maintainers prefer a different approach or decide not to include it.