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

Patch TouchBackend to solve e.targetTouches bug in iOS 13 #1631

Merged
merged 3 commits into from Dec 2, 2019

Conversation

zhusee2
Copy link
Contributor

@zhusee2 zhusee2 commented Nov 26, 2019

Based on the discussions and findings over #1585, I believe Safari in iOS 13 can somehow lose e.targetTouches after a few renders.

As a workaround I set up a private property in TouchBackend to “cache” a valid target Touch from touchstart event, then use it as a fallback in touchmove event handlers when it fails to get client offset from an empty e.targetTouches list.

And this should fix #1585.

@darthtrevino
Copy link
Member

Thanks for the PR! Have you verified that this fix works on an iOS device?

@zhusee2
Copy link
Contributor Author

zhusee2 commented Nov 26, 2019

Yes, I've tried it locally in my project with an iPad running iOS 13.2.3. It does seem working properly.

@darthtrevino darthtrevino self-assigned this Dec 2, 2019
@darthtrevino darthtrevino merged commit f6286ca into react-dnd:master Dec 2, 2019
@zhusee2 zhusee2 deleted the patch_touch_backend branch May 12, 2020 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't drag down on iOS 13
2 participants