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() {
|
mounted() {
|
||||||
this.searchInput = this.$route.query.q;
|
this.searchInput = this.$route.query.q;
|
||||||
this.searchOpened = this.onSearchPage;
|
this.searchOpened = this.onSearchPage;
|
||||||
|
|
||||||
|
if (!this.searchInput) {
|
||||||
|
this.$refs.searchInputField.focus();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeSearch() {
|
closeSearch() {
|
||||||
|
Loading…
Reference in New Issue
Block a user