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

touchStarted triggers twice among other issues with touchStarted/mousePressed on mobile #6739

Closed
1 of 17 tasks
RandomGamingDev opened this issue Jan 14, 2024 · 0 comments · Fixed by #6740
Closed
1 of 17 tasks

Comments

@RandomGamingDev
Copy link
Contributor

RandomGamingDev commented Jan 14, 2024

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

p5.js version

1.9.0

Web browser and version

120.0.6099.210

Operating System

Android

Steps to reproduce this

Steps:

  1. Have touchStarted() or mousePressed() on mobile

Snippet:

Here's a sketch demonstrating it:
https://editor.p5js.org/PotatoBoy/sketches/1F9s-k_5D

On touchscreen:

  • mousePressed and touchStarted both trigger if they're both present (same for mousePressed)
  • If either is without the other it triggers twice
  • touchStarted doesn'tt get called when the mouse is pressed like described in the documentation

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.

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