aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/App.vue1
-rw-r--r--src/components/search_bar/search_bar.js5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/App.vue b/src/App.vue
index be4d1f75..bf6e62e2 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -41,6 +41,7 @@
<search-bar
class="nav-icon mobile-hidden"
@toggled="onSearchBarToggled"
+ @click.stop.native
/>
<router-link
class="mobile-hidden"
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()
+ }
+ })
}
}
}