Ask coding questions

← Back to all posts
touchdown event listener not firing on canvas?
MaxwellGeringer

I am trying to make a basic mobile game, and right now I am trying to make a virtual joystick. When a user presses down, it moves the virtual joystick to their finger and they can move it around until they remove their finger from the screen. I noticed that on mobile, the joystick doesn't work, and on Firefox's responsive design mode while looking at console, I can see that the touchdown event seems to never be firing. Am I doing something wrong?

Issue is at game.js:51 thru 53

Voters
MaxwellGeringer
Comments
hotnewtop
CodingElf66

Nothing's wrong, Replit just sometimes doesn't run on some supported browsers, it works on a PC and Chromebook for me!

Can you mark it as answered? Because I had multiple people asking these type of browser questions. Thanks!

MaxwellGeringer

So, turns out I was using touchdown and not touchstart...