Skip to content
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

Difficult to scroll on touch screen devices #618

Closed
keeganstreet opened this issue Nov 8, 2018 · 3 comments · Fixed by #619
Closed

Difficult to scroll on touch screen devices #618

keeganstreet opened this issue Nov 8, 2018 · 3 comments · Fixed by #619
Labels

Comments

@keeganstreet
Copy link
Collaborator

Downshift is adding a touchstart event listener and reseting the component if the touch originated outside of the component. This is preventing users from scrolling on touch-screens when Downshift is open, unless they scroll by touching inside the associated DOM element.

This effects iOS and Android.

Screen recording:
downshift-touchstart

Simple reproduction on Downshift 3.1.4: https://codesandbox.io/s/k72vql0v3
Try using https://k72vql0v3.codesandbox.io/ on a touch-screen device.

I think this might have already been reported in #454, but I wanted to re-open discussion as it doesn't seem like desirable default behaviour for Downshift.

A potential fix could be to reset on touchend instead of touchstart, but only if there has not been a touchmove. If there has been a touchmove, it suggests the user is scrolling.

@kentcdodds
Copy link
Member

This makes sense and I like your suggestion. Would you be willing to make a pull request for this?

@keeganstreet
Copy link
Collaborator Author

Great, yep I'd be happy to.

kentcdodds pushed a commit that referenced this issue Nov 8, 2018
… (#619)

Closes #618 

Screen recording on iOS including fix:
![downshift-fixed](https://user-images.githubusercontent.com/513363/48190972-2203ab00-e398-11e8-91e1-a2fb6925f11a.gif)

**Checklist**:

- [ ] Documentation N/A
- [x] Tests
- [x] Ready to be merged
- [x] Added myself to contributors table
@kentcdodds
Copy link
Member

🎉 This issue has been resolved in version 3.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants