Merge branch 'focus-on-search-input' into 'develop'

Focus on the search input when the search icon is clicked

See merge request pleroma/pleroma-fe!896
This commit is contained in:
Shpuld Shpludson 2019-07-31 17:39:35 +00:00
commit f4b9efff77

View File

@ -20,6 +20,11 @@ const SearchBar = {
toggleHidden () { toggleHidden () {
this.hidden = !this.hidden this.hidden = !this.hidden
this.$emit('toggled', this.hidden) this.$emit('toggled', this.hidden)
this.$nextTick(() => {
if (!this.hidden) {
this.$refs.searchInput.focus()
}
})
} }
} }
} }