I have an onKeyDown event handler in button but that doesn't get fired when any key is pressed on the external keyboard.
When I press tab/shift+tab focus moves to the button. But any key press on the button is not triggering keyboard events.
This is my code
<button onKeyDown={(e) => {console.log(e);}}>Click here</button>
Keyboard events are not getting fired for any of the html elements even with tabIndex=0.
Post
Replies
Boosts
Views
Activity
While pressing tab/shift+tab using external keyboard focus doesn't move to tag elements even with tabIndex=0.
This is my javascript code
<a href="https://discussions.apple.com/" tabIndex={0}>Click here</a>
Focus moves to all other html elements except link element.