Problem/Motivation
The Swiper.js library provides two important touch control options that are currently not exposed in the Swiper Formatter module configuration:
simulateTouch - Allows the slider to accept mouse events like touch events on desktop (click and drag to change slides). Default: true
allowTouchMove - Enables/disables touch and drag navigation. When disabled, slides can only be changed via navigation buttons, pagination, or programmatically. Default: true
These options are useful for cases where:
You want to disable mouse drag on desktop while keeping touch on mobile
You need a slider that can only be controlled via navigation buttons (e.g., for accessibility or specific UX requirements)
Proposed resolution
Add simulateTouch and allowTouchMove as checkbox options in the "Slides options" section of the Swiper template configuration form.
| Comment | File | Size | Author |
|---|
Issue fork swiper_formatter-3567694
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
ahmad-alyasaki commentedComment #5
bbu23Hi,
Thanks for creating this issue and providing a solution.
Please provide a merge request, we are not reviewing patch files.
Comment #7
ahmad-alyasaki commentedHi,
Thank you for your feedback.
The merge request has been created as requested.
Comment #8
bbu23Comment #13
bbu23This will be available in 2.1.0.
Thank you for your contribution!