From 254648991d4eb706c09b90f21a2e0616b6aaa976 Mon Sep 17 00:00:00 2001 From: Eugenij Date: Wed, 31 Jul 2019 17:39:35 +0000 Subject: [PATCH] Focus on the search input when the search icon is clicked --- src/components/search_bar/search_bar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/search_bar/search_bar.js b/src/components/search_bar/search_bar.js index b8a792ee..d7d85676 100644 --- a/src/components/search_bar/search_bar.js +++ b/src/components/search_bar/search_bar.js @@ -20,6 +20,11 @@ const SearchBar = { toggleHidden () { this.hidden = !this.hidden this.$emit('toggled', this.hidden) + this.$nextTick(() => { + if (!this.hidden) { + this.$refs.searchInput.focus() + } + }) } } }