fix: keybinds overriding forms

This commit is contained in:
ThaUnknown 2023-12-26 13:15:53 +01:00
parent 75e819f6ae
commit 541dc831e6

View file

@ -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])
}
})
})