-
Notifications
You must be signed in to change notification settings - Fork 224
Swipe in iOS? #67
Comments
I bumped into this too. Would be nice to fix. This thread discusses some potential workaround, but I can't quite tell whether it's possible or not: |
This component does not currently work around this issue. One simple approach would be to increase the size of the touch handle via the Another possible solution (haven't tested it myself) would be to fork the repo and prevent the default action from the touch events on the touch handle. @tonygentilcore's SO link mentions this technique as well. That could introduce other possible undesirable effects, like preventing page scrolling entirely, but might work for you. It would theoretically be possible to add a boolean prop on react-sidebar that would enable this behavior. |
I think right now the best solution is to detect iOS and disable touch handle. To infer default iOS behavior may produce undesirable side effects (as mentioned) and bad user experience. |
Worth noting that if users save your web app to the home screen, the touch handle works really well. If that's a common use case, then the interactivity may be worth preserving. |
Since there is now way of disabling the IOS swipe behaviour in JavaScript, I was forced to remove the touch features completely from IOS in react-sidebar version 3. |
Swipe from left goes back in browser history and swipe from right goes forward.
Unfortunately I cannot test it myself on iOS..
Does this component works around this? How?
I would love to reuse this trick with other components if I need to use swipes from left or right.
The text was updated successfully, but these errors were encountered: