Skip to content

Commit

Permalink
fix: prevent enter from submitting key bindings form
Browse files Browse the repository at this point in the history
  • Loading branch information
thenick775 committed May 21, 2024
1 parent e818d4c commit 1430291
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gbajs3/src/components/modals/controls/key-bindings-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export const KeyBindingsForm = ({ id }: KeyBindingsFormProps) => {
key: keyboardEvent.key,
location: keyboardEvent.location
});

keyboardEvent.preventDefault();
}}
error={!!errors[keyBinding.gbaInput]}
helperText={errors?.[keyBinding.gbaInput]?.message}
Expand Down

0 comments on commit 1430291

Please sign in to comment.