Skip to content

[WASM] Add javascript click listener to cancel the 'touches' on non touchable devices #2577

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

Merged
merged 1 commit into from
Jun 27, 2025

Conversation

AlexandreK38
Copy link
Contributor

Currently, in WASM, we can run on devices with touch capabilities (like mobile) or not (desktop with mouse).
In the first case, if the touch is going out of screen it is cancelled, or released if finger doesn't touch the device screen anymore.
In the second case, we know the mouse is clicked, moved but if we move outside the app window and release the mouse no event is triggered, which means the move is in a bad state , still not ended for the GLView.

The only way I found to fix this is to add a javascript click listener only for non touch devices, that triggers an Module call to be used by the GLView to cancel the 'touch' event, if one was existing.

@halx99 halx99 merged commit f04aabf into axmolengine:dev Jun 27, 2025
15 checks passed
@halx99 halx99 added this to the 2.6.2 milestone Jun 27, 2025
@halx99 halx99 added the enhancement New feature or request label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants