Do not disable input when disconnected

This commit is contained in:
Pavel Djundik 2018-08-15 12:00:54 +03:00 committed by Pavel Djundik
parent 1d4ab8fff1
commit 839b07fdc2

View File

@ -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" />
<span
v-if="$root.connected"
id="submit-tooltip"
class="tooltipped tooltipped-w tooltipped-no-touch"
aria-label="Send message">
@ -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;