Autofocus search input in case no query is present
This commit is contained in:
parent
24a738d521
commit
cadcc4b97c
@ -104,6 +104,10 @@ export default {
|
||||
mounted() {
|
||||
this.searchInput = this.$route.query.q;
|
||||
this.searchOpened = this.onSearchPage;
|
||||
|
||||
if (!this.searchInput) {
|
||||
this.$refs.searchInputField.focus();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeSearch() {
|
||||
|
Loading…
Reference in New Issue
Block a user