mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
#5618 - Updated AutoComplete to allow form submission using return
This commit is contained in:
parent
6615f31d8a
commit
f57a90eb51
1 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue