这是indexloc提供的服务,不要输入任何密码
Skip to content

(Re-)Add setting to disable swipe gestures for navigation #2639

@butburg

Description

@butburg

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):

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions