Prevent vertical scrolling while swiping on Safari iOS#129
Prevent vertical scrolling while swiping on Safari iOS#129JiiB wants to merge 6 commits intoFormidableLabs:masterfrom JiiB:pr/disable-scroll-on-swipe
Conversation
| Make changes/updates to the `src/index.js` file. | ||
|
|
||
| ***Please add tests if PR adds/changes functionality.*** | ||
| **_Please add tests if PR adds/changes functionality._** |
There was a problem hiding this comment.
Ok prettier changed it to italic automatically. I can undo this of course
There was a problem hiding this comment.
i think i may need to exclude readme from prettier, lol
|
@JiiB this is a great start! i too am working on this and your PR has pointed out some interesting things. What I've discovered so far:
Working from your approach I'm exploring if there is a way to do the v4 event listener approach.
|
|
updated comment in #127 (comment) |
|
Hey @JiiB thank you for help in identifying and working on this! Based on your solution and a lot research this afternoon, like ~4hrs searching the web, I created #130. Please let me know what you think about the these two different approaches. Current thoughts:
|
|
@hartzis Thanks for your response. I was very busy yesterday. I see your point, that it does not make that much sense to add an additional prop just for this special use case. Unfortunately your PR #130 does not resolve my issue in safari 🤔 It is still possible to scroll vertically while swiping horizontally. I'm going to investigate again and keep up updated. |
I'm creating this PR because I have the same problem as described here: #127
On iOS Safari it was possible to scroll vertically while swiping horizontally.
It's now possible to disable the
onSwipingfunction if the initial swipe direction isupordown. TheonSwipingfunction will only be called if the initial swipe direction isleftorright.Usage
Tasks:
useSwipeable(not sure if this is even possible with my current implementation)Notes:
README.md. I personally like it better, but I could undo it.useSwipeable