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
In my example app / root component is rendered into document.body it also set's up onKeyDownonKeyUp to handle application keyboard shortcuts.
The problem I'm running into is that some user interaction like clicking around page causes document.body to obtain focus (to become document.activeElement) and in that case onKeyDown & onKeyUp event handlers are no longer invoked.
I know I could register "keydown", "keyup" event handlers manually once app component is mounted but I would prefer to stay with-in react.
The text was updated successfully, but these errors were encountered:
In my example app / root component is rendered into
document.body
it also set's uponKeyDown
onKeyUp
to handle application keyboard shortcuts.The problem I'm running into is that some user interaction like clicking around page causes
document.body
to obtain focus (to becomedocument.activeElement
) and in that caseonKeyDown
&onKeyUp
event handlers are no longer invoked.I know I could register "keydown", "keyup" event handlers manually once app component is mounted but I would prefer to stay with-in react.
The text was updated successfully, but these errors were encountered: