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 release input not working on WASM/Web #3752

Closed
samcarey opened this issue Jan 23, 2022 · 3 comments
Closed

Touch release input not working on WASM/Web #3752

samcarey opened this issue Jan 23, 2022 · 3 comments
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds

Comments

@samcarey
Copy link

samcarey commented Jan 23, 2022

Bevy version

Whichever version is used for the site: I think main, currently 514754d.

Operating system & version

Firefox on Windows, Chrome on Windows, Firefox on iOS.

What you did

Go here on a device with a touch screen: https://bevyengine.org/examples/ui/button/.
Touch the button then stop touching it.

What you expected to happen

When you stop touching it, the displayed text should return to displaying "Button".

What actually happened

When you stop touching it, the button continues to display "Press", as if you never stopped touching it.

Additional information

I think this is making it impossible to properly touch buttons with bevy_egui on WASM. I first noticed the problem when touching the buttons on this example had no effect, although it does seem to register hover events: https://mvlabat.github.io/bevy_egui_web_showcase/index.html

@samcarey samcarey added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jan 23, 2022
@mockersf
Copy link
Member

Could you try with this PR: #3599

@mockersf mockersf added A-Input Player input via keyboard, mouse, gamepad, and more O-Web Specific to web (WASM) builds and removed S-Needs-Triage This issue needs to be labelled labels Jan 23, 2022
@samcarey
Copy link
Author

Could you try with this PR: #3599

Yes! That fixes it!

@forbjok
Copy link
Contributor

forbjok commented Jan 29, 2022

Having the same issue in browser on Android. Will this fix get merged and released in a 0.6 bugfix release?

@bors bors bot closed this as completed in e749ee7 Feb 13, 2022
cart added a commit that referenced this issue Feb 13, 2022
On platforms like wasm (on mobile) the cursor can disappear suddenly (ex: the user releases their finger from the screen). This causes the undesirable behavior in #3752. These changes make the UI handler properly handle this case.

Fixes #3752
Alternative to #3599
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds
Projects
None yet
3 participants