You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When you Alt+Tab out of the window and back in again, the Alt key is still considered as being held down as the browser never fires the key up event.
To Reproduce
Steps to reproduce the behavior:
Go to the Sandbox Below
Click on Button to check if Alt is down (Should be No)
Alt+Tab out of the Window then back into it
Click on Button to check if Alt is down (Should be Yes)
Expected behavior
When browser window returns to focus only keys that are actually held down should act as if they are being held down.
Desktop (please complete the following information):
OS: Windows 11
Browser: Edge (Chromium)
Version: 108.0.1462.54 (Official build) (64-bit)
Additional context
I haven't done a PR yet however I believe the fix is to add an additional handler "window.addEventListener('blur', keyUpHandler) wherever the document.addEventListener('keuUp', keyUpHandler) is called.
The text was updated successfully, but these errors were encountered:
Describe the bug
When you Alt+Tab out of the window and back in again, the Alt key is still considered as being held down as the browser never fires the key up event.
To Reproduce
Steps to reproduce the behavior:
https://codesandbox.io/s/funny-christian-3tqoro?file=/src/App.js
Expected behavior
When browser window returns to focus only keys that are actually held down should act as if they are being held down.
Desktop (please complete the following information):
Additional context
I haven't done a PR yet however I believe the fix is to add an additional handler "window.addEventListener('blur', keyUpHandler) wherever the document.addEventListener('keuUp', keyUpHandler) is called.
The text was updated successfully, but these errors were encountered: