Skip to content

Commit

Permalink
fix: keybinds overriding forms
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaUnknown committed Dec 26, 2023
1 parent 75e819f commit 541dc83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions common/modules/click.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ function navigateDPad (direction = 'up') {
// hacky, but make sure keybinds system loads first so it can prevent this from running
queueMicrotask(() => {
document.addEventListener('keydown', e => {
e.preventDefault()
if (DirectionKeyMap[e.key]) navigateDPad(DirectionKeyMap[e.key])
if (DirectionKeyMap[e.key]) {
e.preventDefault()
navigateDPad(DirectionKeyMap[e.key])
}
})
})

0 comments on commit 541dc83

Please sign in to comment.