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
If I press a key that open for example a dialog (that makes the Hotkeys component wrapper to lose focus) when the dialog is closed the key pressed for open it is still pressed when I try to use other mapped hotkeys.
This is a basic reproduction: CODESANDBOX
How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc)
HotKeys
Expected behavior
When the component lose focus keys pressed should be reset or refreshed, and at least a method to do it manually
Platform (please complete the following information):
Version of react-hotkeys: 2.0.0
Browser [e.g. chrome, safari] Chrome
OS: [e.g. iOS] MacOs
Are you willing and able to create a PR request to fix this issue?
I don't think
Include the smallest log that includes your issue:
HotKeys (F1📗-E5🧡-C1⭐️-P0🔺:) New 'Delete' keydown event.
HotKeys (F1📗-E5🧡-C0🔺) Found action that matches 'Delete': DELETE. Calling handler . . .
HotKeys (F1📗-E5🧡-C0🔺) Stopping further event propagation.
HotKeys (F1📗-E7💚-C1⭐️-P0🔺:) New (simulated) 'Delete' keypress event.
HotKeys (F1📗-C1⭐️-P0🔺:) Received new props.
HotKeys (F1📗-C1⭐️-P0🔺:) Lost focus. -----> THIS HAPPENS WHEN DIALOG OPENS
HotKeys (F2📘-C1⭐️-P0🔺:) Focused. -----> THIS HAPPENS WHEN I CLOSE DIALOG
HotKeys (F2📘-E8💙-C1⭐️-P0🔺:) New 'Escape' keydown event
HotKeys (F2📘-E8💙-C0🔺) No matching actions found for 'Delete+Escape' keydown. -----> I JUST PRESS "DELETE"
HotKeys (F2📘-E10💜-C1⭐️-P0🔺:) New (simulated) 'Escape' keypress event.
HotKeys (F2📘-E11🧡-C1⭐️-P0🔺:) New 'Escape' keyup event.
HotKeys (F2📘-E11🧡-C0🔺) No matching actions found for 'Delete+Escape' keyup. -----> WRONG KEYS COMBO TRIGGERED (DELETE IS NOT STILL PRESSED)
The text was updated successfully, but these errors were encountered:
Describe the bug
If I press a key that open for example a dialog (that makes the Hotkeys component wrapper to lose focus) when the dialog is closed the key pressed for open it is still pressed when I try to use other mapped hotkeys.
This is a basic reproduction: CODESANDBOX
How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc)
HotKeys
Expected behavior
When the component lose focus keys pressed should be reset or refreshed, and at least a method to do it manually
Platform (please complete the following information):
Are you willing and able to create a PR request to fix this issue?
I don't think
Include the smallest log that includes your issue:
The text was updated successfully, but these errors were encountered: