"Pressed" detection bugged after unfocusing in game in WASM
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.13
## \[Optional\] Relevant system information
- Windows 10
- Firefox
- Chrome
## What you did
I held down a button then unfocused the window.
## What went wrong
The button remained held down according to ButtonInput "pressed" even when I released it. Refocusing the window does not fix this, but refocusing then pressing and releasing does.
## Additional information
Tested in both Firefox and Chrome with similar behaviors.
Contributor guide
Research direction
Start by reproducing the issue in a WASM build in Firefox and Chrome, using the ButtonInput "pressed" state and the focus-loss sequence described. Trace how input state is handled when the game window loses and regains focus; done when releasing the button after refocusing clears the pressed state without requiring another press.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100