Skip to content

Commit

Permalink
bugfix(autocomplete): Prevent event default when pressing enter with …
Browse files Browse the repository at this point in the history
…open AutoComplete (#1439)
  • Loading branch information
carlgieringer authored and mlaursen committed May 9, 2023
1 parent 8417216 commit c505642
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/autocomplete/src/useAutoComplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ export function useAutoComplete({
break;
case "Enter":
if (visible && focusedIndex >= 0) {
event.preventDefault();
event.stopPropagation();
handleAutoComplete(focusedIndex);
hide();
Expand Down

0 comments on commit c505642

Please sign in to comment.