Autofocus search input in case no query is present

This commit is contained in:
Nachtalb 2021-05-06 03:24:20 +02:00
parent 24a738d521
commit cadcc4b97c
No known key found for this signature in database
GPG Key ID: E48DF13C07055D92

View File

@ -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() {