I have globalhotkeys and one hotkeys component (for a list) on my page.
A second hotkeys component in the help modal.
The first time the help about keymap appears, I have all hotkeys listed from global and the list hotkeys.
But every attempt after the first one misses to render the list hotkeys.
From the logs, and after some debugging, I can see, that when the help is displayed, the escape hotkey for the help modal is registered with the FocusOnlyEventStrategy. Once the modal is closed, this gets deregistered (with componentId=1), and as the rootComponentId === 1, latter one gets set to null. Eventhough, the ComponentTree still contains the List HotKeys keymap with id===0, as rootComponentId===null now, the next call to getApplicationKeyMap returns empty.
How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc)
There is one GlobalHotKeys and two HotKeys tags.
Roughly like this:
Help contains a HotKey inside defining ESCAPE to close the dialog.
The HotKey around List defines PGDOWN, PGUP, UP, DOWN for moving in the list.
Expected behavior
The List HotKeys should still be rendered.
Platform (please complete the following information):
Version of react-hotkeys: 2.0.0
Browser: Chrome 79.0.3945.88 64-bit
OS: Windows 10
Are you willing and able to create a PR request to fix this issue?
tldr: Nope.
I don't understand the esosystem enough to make the change. IDK what is the expected behaviour of the related objects.
Include the smallest log that includes your issue:
Describe the bug
I have globalhotkeys and one hotkeys component (for a list) on my page. A second hotkeys component in the help modal. The first time the help about keymap appears, I have all hotkeys listed from global and the list hotkeys. But every attempt after the first one misses to render the list hotkeys.
From the logs, and after some debugging, I can see, that when the help is displayed, the escape hotkey for the help modal is registered with the FocusOnlyEventStrategy. Once the modal is closed, this gets deregistered (with componentId=1), and as the rootComponentId === 1, latter one gets set to null. Eventhough, the ComponentTree still contains the List HotKeys keymap with id===0, as rootComponentId===null now, the next call to getApplicationKeyMap returns empty.
How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc) There is one GlobalHotKeys and two HotKeys tags. Roughly like this:
Help contains a HotKey inside defining ESCAPE to close the dialog. The HotKey around List defines PGDOWN, PGUP, UP, DOWN for moving in the list.
Expected behavior The List HotKeys should still be rendered.
Platform (please complete the following information):
Are you willing and able to create a PR request to fix this issue? tldr: Nope. I don't understand the esosystem enough to make the change. IDK what is the expected behaviour of the related objects.
Include the smallest log that includes your issue:
Filtered only for the string register
What Configuration options are you using?