Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch moving event still fires when moving outside of canvas at mobile device #5592

Closed
rexrainbow opened this issue Mar 4, 2021 · 3 comments

Comments

@rexrainbow
Copy link
Contributor

Version

  • Phaser Version: 3.52.0

  • Operating system: ipad

  • Browser: safari

Description

Run this test at

A. Desktop chrome browser, with mouse moving
1. pointer-down start from canvas
2. dragging mouse cursor outside of canvas
Result: The 'pointermove' event will be fired started from dragging inside canvas, stopped when mouse cursor is outside of canvas. i.e. value of eventCounter won't be increasing

B. ipad safari browser, with touching and the same steps
Result: The 'pointermove' event will be still fired when touching dragging outside of canvas. value of eventCounter is increasing all times.

The trigger logic of 'pointermove' event seem not the same between mouse input and touch input.

@photonstorm
Copy link
Collaborator

Looking into this further, it appears that the touchover and touchout events are no longer implemented in any browser, which is why this part of the Touch Manager fails.

@photonstorm
Copy link
Collaborator

Hmm.. and I can't use event.target because it stays as the canvas even when you're moving well outside of it 🤔

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants