Fixed #5618 - AutoComplete: Enter does not submit form
parent
f1e3ded7da
commit
b0b91c2050
|
@ -617,10 +617,10 @@ export default {
|
||||||
onEnterKey(event) {
|
onEnterKey(event) {
|
||||||
if (!this.overlayVisible) {
|
if (!this.overlayVisible) {
|
||||||
this.focusedOptionIndex = -1; // reset
|
this.focusedOptionIndex = -1; // reset
|
||||||
|
this.onArrowDownKey(event);
|
||||||
} else {
|
} else {
|
||||||
if (this.focusedOptionIndex !== -1) {
|
if (this.focusedOptionIndex !== -1) {
|
||||||
this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);
|
this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);
|
||||||
event.preventDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hide();
|
this.hide();
|
||||||
|
|
Loading…
Reference in New Issue