Skip to content

[p5.js 2.0 Bug Report]: mouseX and mouseY not updated for touches #7760

@bojidar-bg

Description

@bojidar-bg

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
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

2.0.0

Web browser and version

Firefox Android 137.0.2 / Chrome Android 135.0.7049.100

Operating system

Android

Steps to reproduce this

Steps:

  1. Open a sketch that uses mouseX or mouseY on Android, e.g. an example from https://beta.p5js.org/reference/p5/mouseX/
  2. Tap somewhere on the canvas
  3. mouseX and mouseY remain 0. Expected: mouseX and mouseY "hold the x/y-coordinate of the most recent touch point" as described in the documentation.

Snippet:

function draw() {
  background(200);
  text(`x: ${mouseX} y: ${mouseY}`, 0, 50);
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions