diff options
| author | Eugenij <eugenijm@protonmail.com> | 2019-07-31 17:39:35 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-07-31 17:39:35 +0000 |
| commit | 254648991d4eb706c09b90f21a2e0616b6aaa976 (patch) | |
| tree | 7ee532471eee527094f4ee407fc64f5c57288510 /src/components/search_bar | |
| parent | 3f4cb1d58e2dff2663226f059cfa8abbcc6a2ad2 (diff) | |
Focus on the search input when the search icon is clicked
Diffstat (limited to 'src/components/search_bar')
| -rw-r--r-- | src/components/search_bar/search_bar.js | 5 |
1 files changed, 5 insertions, 0 deletions
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() + } + }) } } } |
