Skip to content

swipeable: avoiding conflict with default scroll #388

Description

@MadeInPierre

Hello @vnphanquang! Loving the swipeable module, thank you.

I'm having a UX issue on mobile for an X-axis-only element (my goal is to implement a simple "swipe-to-delete" gesture). The current version seems to immediately disable page scrolling too. Demo:

swipeable_mobile_yscroll.mp4

I tried setting disableTouchEvents to false but it replaces the scrolling issue with unpredictable swiping behavior.

Happy to try a PR if you have an implementation recommendation? Would be great to (1) set a startThreshold, (2) only start setting --swipe-distance-x after startThreshold, and (3) only apply touch-none after startThreshold. Maybe even completely disable the swipe once a vertical scroll is registered?

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions