aboutsummaryrefslogtreecommitdiff
path: root/src/components/autocomplete_input/autocomplete_input.js
diff options
context:
space:
mode:
authorXiaofeng An <futureweb2020@yandex.com>2019-02-08 11:26:17 -0500
committerXiaofeng An <futureweb2020@yandex.com>2019-02-08 11:26:17 -0500
commit63680227c1fa03db64d6dccf51af24580de01f7b (patch)
tree55513829b1f74d260f1a765726a9ea90edd7667e /src/components/autocomplete_input/autocomplete_input.js
parente8dc019afd31981295fbf79637727fb4ce34a072 (diff)
select either textarea or input
Diffstat (limited to 'src/components/autocomplete_input/autocomplete_input.js')
-rw-r--r--src/components/autocomplete_input/autocomplete_input.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/autocomplete_input/autocomplete_input.js b/src/components/autocomplete_input/autocomplete_input.js
index 0f1a510c..2a959fd1 100644
--- a/src/components/autocomplete_input/autocomplete_input.js
+++ b/src/components/autocomplete_input/autocomplete_input.js
@@ -126,7 +126,7 @@ const AutoCompleteInput = {
const candidate = this.candidates[this.highlighted]
const replacement = candidate.utf || (candidate.screen_name + ' ')
this.text = Completion.replaceWord(this.text, this.wordAtCaret, replacement)
- const el = this.$el.querySelector('textarea')
+ const el = this.$el.querySelector('textarea') || this.$el.querySelector('input')
el.focus()
this.caret = 0
this.highlighted = 0