Skip to content

Commit

Permalink
primefaces#5618 - Updated AutoComplete to allow form submission using…
Browse files Browse the repository at this point in the history
… return
  • Loading branch information
carldenigma committed Apr 19, 2024
1 parent 6615f31 commit f57a90e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/lib/autocomplete/AutoComplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f57a90e

Please sign in to comment.