phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
37.19k stars 7.1k forks source link

Emulated touch events not being handled correctly #6888

Closed HarrisonKeys-wymac closed 3 months ago

HarrisonKeys-wymac commented 3 months ago

Version

Description

While using emulated devices in Chrome or Microsoft Edge, pointer down is only called once the touch is released. This only occurs the first time the project is ran, if you refresh the page touch events will work as expected, but if you close the tab and open a new one, they will be broken again.

Example Test Code

This can be reproduced using the webpack template, I added a comment inside each of the input.once('pointerdown') to log that the event had been called. https://github.com/phaserjs/template-webpack

Additional Information

photonstorm commented 3 months ago

We cannot duplicate this. Have tested on Windows 11 in several browsers (Edge, Chrome, FF). Here is a video showing it working fine in Win 11 Chrome in Mobile Emulation mode:

https://github.com/user-attachments/assets/d2f73a52-f926-42a2-bcdb-a06f528212eb

The console is logging the down event immediately, without releasing the pointer first.

I would suggest testing this on another device. It could well be something local (browser extension, plugin, etc)