mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-18 06:06:36 +02:00
Unfocus chat input when pressing escape
This commit is contained in:
parent
2451f222e8
commit
bbe6b34371
|
@ -101,6 +101,8 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$root.$on("escapekey", this.blurInput);
|
||||
|
||||
if (this.$store.state.settings.autocomplete) {
|
||||
autocompletionRef = autocompletion(this.$refs.input);
|
||||
}
|
||||
|
@ -161,6 +163,8 @@ export default {
|
|||
}
|
||||
},
|
||||
destroyed() {
|
||||
this.$root.$off("escapekey", this.blurInput);
|
||||
|
||||
if (autocompletionRef) {
|
||||
autocompletionRef.destroy();
|
||||
autocompletionRef = null;
|
||||
|
@ -255,6 +259,9 @@ export default {
|
|||
openFileUpload() {
|
||||
this.$refs.uploadInput.click();
|
||||
},
|
||||
blurInput() {
|
||||
this.$refs.input.blur();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue