processing / processing/p5.js

[BUG] Firefox TouchStarted not working

Open
#4,656 16 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area:Events Bug Mobile
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Most appropriate sub-area of p5.js?
  • Color
  • Core/Environment/Rendering
  • Data
  • Dom
  • Image
  • IO
  • Events
  • Math
  • Typography
  • Utilities
  • WebGL
  • Other (Touch? User Interaction?)
Details about the bug:

TouchStarted is not registering in Firefox

  • p5.js version: latest? also web editor and react-p5 and therefore (devDependency) 1.0.0?
  • Web browser and version: Firefox! (77.0.1 - latest) but not on chrome...
  • Operating System: Windows, (not android - tested)
  • Steps to reproduce this:
    2 Ways I tested:
    • The hard way: With react and react-p5
    • The easy way: on the p5 editor in a new sketch type:
      function setup() {
        createCanvas(400, 400);
       }
    
      function draw() {
        background(220);
      }
    
      function touchStarted() {
         console.log("Touch started"); 
      }
    
    I expected it to log "Touch started" but it does not do that. (mousePressed however works)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the p5 editor sketch using touchStarted() and compare its behavior in Firefox 77.0.1 with Chrome, where mousePressed() works. Trace the touch event entry point and verify that the example logs "Touch started" in Firefox without regressing mousePressed().

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.