yoannmoinet / nipplejs

:video_game: A virtual joystick for touch capable interfaces.
https://yoannmoinet.github.io/nipplejs
MIT License
1.77k stars 181 forks source link

joystick with other elements #175

Open EditedCocktail opened 2 years ago

EditedCocktail commented 2 years ago

When joystick touched, touch events on other elements dont work.

To Reproduce

  1. Add joystick
  2. Add button
  3. Press joystick on mobile
  4. Press button while holding joystick
  5. Ontouch button event wont work

Smartphone

lancety commented 2 years ago

I guess your button is using onClick event. instead click, try onPointerDown onPointerUp. I have same issue, onCLick wont trigger if a stick is active, but pointer events are working, btw, my ui component is based on react.

Saqib92 commented 1 year ago

I have almost same issue in Angular. When holding joystick and click any other button joy stick loses focus and goes back to centre.