Fix toggling search on mobile.
This commit is contained in:
parent
2591ae9e8e
commit
28c740ab67
@ -15,7 +15,7 @@
|
|||||||
class="search"
|
class="search"
|
||||||
type="button"
|
type="button"
|
||||||
aria-label="Search messages in this channel"
|
aria-label="Search messages in this channel"
|
||||||
@click.prevent="toggleSearch"
|
@mousedown.prevent="toggleSearch"
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
@ -40,13 +40,14 @@ export default {
|
|||||||
closeSearch() {
|
closeSearch() {
|
||||||
this.searchOpened = false;
|
this.searchOpened = false;
|
||||||
},
|
},
|
||||||
toggleSearch(event) {
|
toggleSearch() {
|
||||||
event.preventDefault();
|
|
||||||
this.searchOpened = !this.searchOpened;
|
|
||||||
|
|
||||||
if (this.searchOpened) {
|
if (this.searchOpened) {
|
||||||
this.$refs.searchInputField.focus();
|
this.$refs.searchInputField.blur();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.searchOpened = true;
|
||||||
|
this.$refs.searchInputField.focus();
|
||||||
},
|
},
|
||||||
searchMessages(event) {
|
searchMessages(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user