beepbox
beepbox copied to clipboard
Bug: Ctrl key/Record mode gets stuck sometimes
How to reproduce:
- In Firefox (and/or other browsers?), use Ctrl+Tab or Ctrl+PageUp/Down to switch away from a BeepBox tab
- Switch back to the tab, but using the mouse to select the tab instead
- Observe that it the 'Play' button has turned into 'Record' and is stuck until Ctrl is tapped again
The first time I observed this, I didn't even realize what was happening, only that I'd sometimes switch back to a BeepBox tab to find Play turned to Record, and not knowing why, my only recourse was to reload the page.
Suggested Fix
possibly check all key states when a tab (re)gains focus? not sure, didn't test it in any browsers. constantly checking keydown status with setInterval or w/e would definitely fix it but possibly at the cost of grave performance issues
This happens on various other browsers too. It's a fairly small bug, not sure if it'll be fixed or not but we'll see.