Merge pull request #5619 from carldenigma/master

#5618 - Updated AutoComplete to allow form submission using return
pull/5630/head
Tuğçe Küçükoğlu 2024-04-19 15:10:57 +03:00 committed by GitHub
commit f1e3ded7da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

@ -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);