diff --git a/web/public/js/components/common/combo-box.js b/web/public/js/components/common/combo-box.js index 29d7d0f2..1f1db6a8 100644 --- a/web/public/js/components/common/combo-box.js +++ b/web/public/js/components/common/combo-box.js @@ -110,6 +110,29 @@ Vue.component("combo-box", { }, change: function () { this.$emit("change", this.selectedItem) + + let that = this + setTimeout(function () { + if (that.$refs.selectedLabel != null) { + that.$refs.selectedLabel.focus() + } + }) + }, + submitForm: function (event) { + if (event.target.tagName != "A") { + return + } + let parentBox = this.$refs.selectedLabel.parentNode + while (true) { + parentBox = parentBox.parentNode + if (parentBox == null || parentBox.tagName == "BODY") { + return + } + if (parentBox.tagName == "FORM") { + parentBox.submit() + break + } + } } }, template: `