[BUG] Line Breaks in Textarea Disable Hotkeys Until Refocusing
Describe the bug Adding a line break (i.e. hitting enter in the textarea) appears to deactivate react-hotkeys until re-focused. See https://codesandbox.io/embed/ecstatic-https-04p9f
In that example, the key map combination is meta+up. The handler simply outputs the value of the textarea. If you add some text, then add a few line breaks and add some more text, then immediately try to activate the handler by hitting meta+up, nothing happens. If you unfocus and refocus, things work as expected.
How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc)
HotKeys + ObserveKeys
Expected behavior
Line breaks in the textarea should have no effect hotkeys working.
Platform (please complete the following information):
- Version of react-hotkeys 2.0.0-pre8
- Browser [e.g. chrome, safari] Chromium 74.0.3729.108
- OS: [e.g. iOS] MacOS
Are you willing and able to create a PR request to fix this issue? Depending on the scope of the issue (which you may understand better than I do)
APPLICABLE TO v2.0.0-pre1 AND ABOVE: ======================
Include the smallest log that includes your issue: Happy to do this if code sandbox is not adequate
What Configuration options are you using? None!
Do you find any solution?
@andreperegrina I never did! I actually ended up swapping out React Hotkeys for a hooks based approach where this was an issue. It's possible that the newest version does fix the problem though, maybe @greena13 can confirm?