From 2d77c98c00d0bdd11eec1983f2428c7572c747ce Mon Sep 17 00:00:00 2001 From: melloware Date: Tue, 5 Jul 2022 10:40:26 -0400 Subject: [PATCH] Fix #3033: Autocomplete form submit on ENTER if no item highlighted --- components/lib/autocomplete/AutoComplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/autocomplete/AutoComplete.js b/components/lib/autocomplete/AutoComplete.js index 23340a327a..5aa8514124 100644 --- a/components/lib/autocomplete/AutoComplete.js +++ b/components/lib/autocomplete/AutoComplete.js @@ -277,9 +277,9 @@ export const AutoComplete = React.memo(React.forwardRef((props, ref) => { if (highlightItem) { selectHighlightItem(event, highlightItem); hide(); + event.preventDefault(); } - event.preventDefault(); break; //escape