-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent vertical scrolling while swiping on Safari iOS #129
Conversation
|
||
## Development | ||
|
||
Initial set up, with `node 10+`, run `npm install`. | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok prettier changed it to italic automatically. I can undo this of course
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
onSwiping
function if the initial swipe direction isup
ordown
. TheonSwiping
function will only be called if the initial swipe direction isleft
orright
.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