Merge pull request #4242 from brunnre8/master

MessageSearchForm: do not focus input if search is closed
This commit is contained in:
Max Leiter 2021-06-05 00:33:42 -07:00 committed by GitHub
commit 8fc7a6c0df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
<input <input
ref="searchInputField" ref="searchInputField"
v-model="searchInput" v-model="searchInput"
type="text" type="search"
name="search" name="search"
class="input" class="input"
placeholder="Search messages…" placeholder="Search messages…"
@ -105,7 +105,7 @@ export default {
this.searchInput = this.$route.query.q; this.searchInput = this.$route.query.q;
this.searchOpened = this.onSearchPage; this.searchOpened = this.onSearchPage;
if (!this.searchInput) { if (!this.searchInput && this.searchOpened) {
this.$refs.searchInputField.focus(); this.$refs.searchInputField.focus();
} }
}, },