MessageSearchForm: do not focus input if search is closed
Else whenever the element gets created (switch from server chan to a normal one) the browser tries to focus the hidden element
This commit is contained in:
parent
fa854fde78
commit
c369a764ed
@ -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();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user