-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix for touchStarted triggers twice among other issues with touchStarted/mousePressed on mobile #6740
Fix for touchStarted triggers twice among other issues with touchStarted/mousePressed on mobile #6740
Conversation
I also mentioned in #6738, but a comment explaining the flag would help. Other than that I think this approach makes sense. I notice there was a branch for Safari that is now removed. I assume modern Safari doesn't need it any more, but do you know what version that started in? Also tagging events stewards, who are probably more familiar than I am with the control flow of these events: @limzykenneth, @richardegil, @angelabelle, @littlejacinthe, @TanviKumar, @tuminzee |
The Safari branch wasn't functioning properly in the first place, since it breaks the the behavior described before where it's supposed to call Safari Issue: https://bugs.webkit.org/show_bug.cgi?id=105406 |
I've added the comment |
Hello everyone, I just want to add that I did the tests for this on Safari, and it all looks good. I also tried it out on Chrome on my Android phone, and Safari on my iPhone behaved the same way. So, it seems like things are working fine on both browsers. |
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.
Thanks everyone for helping check that this works as expected!
Resolves #6739
Note: This looks like nearly the same issue with #6737. We might have to check if this sort of issue applies to any other event listeners. For now, I'll list these 2 as separate issues and pull requests since I already created the first pair.
Changes:
Adds an instance variable called touchstart to p5 and changed p5.prototype._ontouchstart & p5.prototype._onmousedown to function as documented.
Screenshots of the change:
On touchscreen
PR Checklist
npm run lint
passes