[p5.js 1.11.8 Bug Report]: mousePressed doesnt work on iPhone and iPad safari
Open
Nobody has claimed this yet.
Area:Events
p5.js 2.0+
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Most appropriate sub-area of p5.js?
- Events
p5.js version
1.11.8
Web browser and version
iPhone Safari
Operating system
iOS
Steps to reproduce this
Steps:
- mousePressed does not work in iPhone Safari - 1.11.8 - https://editor.p5js.org/qalqi/sketches/IRxUM48mb
https://github.com/user-attachments/assets/81315614-08e6-4486-98e4-0a137ba0e2d5
- mousePressed works in iPhone Safari - 2.0.3 - https://editor.p5js.org/qalqi/sketches/IRxUM48mb
https://github.com/user-attachments/assets/e1cef539-f7dc-455a-977b-6aeb77d273aa
Snippet:
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
}
function mousePressed() {
alert('hi! Version 1.11.8')
}
A similar issue is earlier closed for touch move at https://github.com/processing/p5.js/issues/5358 #5358
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the linked sketches on iPhone or iPad Safari with p5.js 1.11.8, then compare the same sketch with 2.0.3. Trace the Events implementation responsible for mousePressed and verify that the handler fires on the affected Safari versions without breaking the working behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100