Skip to content

Issue with multiple joysticks #32

@Xamyrz

Description

@Xamyrz

Describe the bug
the "touchend" event should be listening to "canvas" rather than "document", as in my webapp, when i want to have 2 joysticks, and I let go of one of them, the "touchend" event gets fired on both of the joysticks.

To Reproduce
Steps to reproduce the behavior:

  1. add 2 joysticks
  2. touch 2 at the same time
  3. let go of one
  4. "touchend" will be fired for both joysticks, rather than just the one.

Expected behavior
touchend fired on the joystick that actually initialised it, rather than both

Screenshots
ezgif-5-5020b8eb2b

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] ALL DEVICES
  • OS: [e.g. iOS8.1] ALL OS's
  • Browser [e.g. stock browser, safari] ALL BROWSERS
  • Version [e.g. 22] ALL

Additional context
None

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions