resolve focus issue in the auto-complete for name field

This commit is contained in:
Xiaofeng An 2019-02-13 15:39:37 -05:00
parent 98c27fd812
commit 19dd36945a

View file

@ -113,7 +113,7 @@ const AutoCompleteInput = {
},
replace (replacement) {
this.$emit('input', Completion.replaceWord(this.value, this.wordAtCaret, replacement))
const el = this.$el.querySelector('textarea')
const el = this.$el.querySelector('textarea') || this.$el.querySelector('input')
el.focus()
this.caret = 0
},