From 839b07fdc2a1652dbc6f0b4cd92f89842e9922ec Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 15 Aug 2018 12:00:54 +0300 Subject: [PATCH] Do not disable input when disconnected --- client/components/ChatInput.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/components/ChatInput.vue b/client/components/ChatInput.vue index e69dd74a..4ba5c58a 100644 --- a/client/components/ChatInput.vue +++ b/client/components/ChatInput.vue @@ -11,11 +11,9 @@ v-model="channel.pendingMessage" :placeholder="getInputPlaceholder(channel)" :aria-label="getInputPlaceholder(channel)" - :disabled="!$root.connected" class="mousetrap" @keypress.enter.exact.prevent="onSubmit" /> @@ -128,6 +126,10 @@ export default { // This can only be called from another interactive event (e.g. button click) $(this.$refs.input).trigger("click").trigger("focus"); + if (!this.$root.connected) { + return false; + } + const target = this.channel.id; const text = this.channel.pendingMessage;