diff --git a/web/src/components/Autocomplete.vue b/web/src/components/Autocomplete.vue index e524dfb..4ce4fa9 100644 --- a/web/src/components/Autocomplete.vue +++ b/web/src/components/Autocomplete.vue @@ -56,6 +56,12 @@ export default defineComponent({ if(e.key == "Enter") { const selected = this.$data.Suggestions[0]; this.selectElement(selected); + const el = (e.target); + const inputElements = Array.from(el.ownerDocument.querySelectorAll('input:not([disabled]):not([readonly])')); + const currentIndex = inputElements.indexOf(el); + const nextElement = inputElements[currentIndex < inputElements.length - 1 ? currentIndex + 1 : 0]; + (nextElement).focus(); + } }, selectElement(element : Suggestion) {