Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Commit

Permalink
Fix accessibility bug from live demo
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeSlev committed Aug 2, 2019
1 parent 678b14c commit da6b882
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/view/components/cpx/Cpx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,12 @@ const setupKeyPresses = (
) => {
window.document.addEventListener("keydown", event => {
const keyEvents = [event.key, event.code];
// Don't listen to keydown events from the switch
// Don't listen to keydown events for the switch, run button and enter key
if (
!(
keyEvents.includes(CONSTANTS.KEYBOARD_KEYS.S) ||
keyEvents.includes(CONSTANTS.KEYBOARD_KEYS.CAPITAL_F)
keyEvents.includes(CONSTANTS.KEYBOARD_KEYS.CAPITAL_F) ||
keyEvents.includes(CONSTANTS.KEYBOARD_KEYS.ENTER)
)
) {
onKeyEvent(event, true);
Expand Down

0 comments on commit da6b882

Please sign in to comment.