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 Input: only one finger is updated when two or more are moving in Firefox for Android #4113

Open
bogoblin opened this issue Feb 4, 2025 · 4 comments · May be fixed by #4118
Open

Touch Input: only one finger is updated when two or more are moving in Firefox for Android #4113

bogoblin opened this issue Feb 4, 2025 · 4 comments · May be fixed by #4118
Labels
B - bug Dang, that shouldn't have happened DS - web

Comments

@bogoblin
Copy link

bogoblin commented Feb 4, 2025

Description

I'm not sure if this is a bug with winit or if it's a bug in Firefox, but I'm implementing pinch to zoom and I've found that when two fingers are moving at once, only one of them will be updated. It works just fine in Chrome.

I built a tool to visualise the touch inputs which I've hosted here: https://bogoblin.github.io/winit-touch-test/ or you can look at the repo here: https://github.com/bogoblin/winit-touch-test/

Tested browsers

Firefox

Tested devices

Google Pixel 6

Winit version

0.30.8

@bogoblin bogoblin added B - bug Dang, that shouldn't have happened DS - web labels Feb 4, 2025
@bogoblin
Copy link
Author

bogoblin commented Feb 6, 2025

I have been investigating this - the difference between Firefox and Chrome in this case is that Firefox does not send pointermove events for all fingers, only the first one. I'm not sure if this is intended behavior, but in any case I think that winit should be listening to the touchmove event for touch moves.

I ran my test site on Firefox and used the remote debugger to track the pointermove events, and it's a little hard to see because it batches them, but when I pinch, you can see it sends lots of events for pointer 0, but none for the other pointer.

Image

Whereas, in Chrome, there are separate events for each pointer:

Image

I'm going to try fixing this and I'll create a pull request when I'm done.

@kchibisov
Copy link
Member

Have you tested master?

@bogoblin
Copy link
Author

bogoblin commented Feb 6, 2025

Have you tested master?

@kchibisov I haven't yet but I am just about to.

@bogoblin
Copy link
Author

bogoblin commented Feb 7, 2025

I ported my test app to the version of winit on the master branch and I still get the same result, so I'll continue to look into this.

@bogoblin bogoblin linked a pull request Feb 8, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - web
Development

Successfully merging a pull request may close this issue.

2 participants