Merge pull request #5619 from carldenigma/master
#5618 - Updated AutoComplete to allow form submission using returnpull/5630/head
commit
f1e3ded7da
|
@ -617,16 +617,14 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
|
||||||
},
|
},
|
||||||
onEscapeKey(event) {
|
onEscapeKey(event) {
|
||||||
this.overlayVisible && this.hide(true);
|
this.overlayVisible && this.hide(true);
|
||||||
|
|
Loading…
Reference in New Issue