Skip to content

Commit 4dd3794

Browse files
carlgieringermlaursen
authored andcommitted
bugfix(autocomplete): Prevent event default when pressing enter with open AutoComplete (#1439)
1 parent 64d08d6 commit 4dd3794

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/autocomplete/src/useAutoComplete.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ export function useAutoComplete({
393393
break;
394394
case "Enter":
395395
if (visible && focusedIndex >= 0) {
396+
event.preventDefault();
396397
event.stopPropagation();
397398
handleAutoComplete(focusedIndex);
398399
hide();

0 commit comments

Comments
 (0)