From ef3caa2cf011b742419c442ef11334910b6e52ca Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Mon, 3 Dec 2018 16:10:35 -0500 Subject: [PATCH] Set focus when no workspace role is selected --- js/components/selector.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/components/selector.js b/js/components/selector.js index 4e599494..ddc074a6 100644 --- a/js/components/selector.js +++ b/js/components/selector.js @@ -84,7 +84,11 @@ export default { onShow: function () { setTimeout(() => { // timeout is a hack to make focus work in Chrome - this.$refs.choices.find(choice => choice.selected).$refs.input[0].focus() + if (this.$refs.choices.find(choice => choice.selected)) { + this.$refs.choices.find(choice => choice.selected).$refs.input[0].focus() + } else { + this.$refs.choices[0].$refs.input[0].focus() + } }, 100) },