From f57a90eb5119ac7343198d698d744df1ce06f9e3 Mon Sep 17 00:00:00 2001 From: carldenigma Date: Fri, 19 Apr 2024 11:16:23 +0100 Subject: [PATCH] #5618 - Updated AutoComplete to allow form submission using return --- components/lib/autocomplete/AutoComplete.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/lib/autocomplete/AutoComplete.vue b/components/lib/autocomplete/AutoComplete.vue index 0f79b35af..945e35ee5 100755 --- a/components/lib/autocomplete/AutoComplete.vue +++ b/components/lib/autocomplete/AutoComplete.vue @@ -617,16 +617,14 @@ export default { onEnterKey(event) { if (!this.overlayVisible) { this.focusedOptionIndex = -1; // reset - this.onArrowDownKey(event); } else { if (this.focusedOptionIndex !== -1) { this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]); + event.preventDefault(); } this.hide(); } - - event.preventDefault(); }, onEscapeKey(event) { this.overlayVisible && this.hide(true);