diff --git a/resources/assets/js/pages/manage/components/ChatInput/index.vue b/resources/assets/js/pages/manage/components/ChatInput/index.vue index 2c36a8102..02b961b59 100755 --- a/resources/assets/js/pages/manage/components/ChatInput/index.vue +++ b/resources/assets/js/pages/manage/components/ChatInput/index.vue @@ -425,10 +425,8 @@ export default { }, // Watch disabled change - disabled(newVal) { - if (this.quill) { - this.quill.enable(!newVal) - } + disabled(val) { + this.quill?.enable(!val) }, // Reset lists @@ -448,6 +446,13 @@ export default { }, showEmoji(val) { + if (this.emojiBottom) { + if (val) { + this.quill.enable(false) + } else if (!this.disabled) { + this.quill.enable(true) + } + } if (val) { let text = this.value.replace(/ /g," ") text = text.replace(/<[^>]+>/g, "") @@ -626,7 +631,7 @@ export default { // Instance this.quill = new Quill(this.$refs.editor, this._options) - this.quill.enable(false) + this.quill.enable(!this.disabled) // Set editor content if (this.value) { @@ -635,11 +640,6 @@ export default { this.$emit('input', this.getInputCache()) } - // Disabled editor - if (!this.disabled) { - this.quill.enable(true) - } - // Mark model as touched if editor lost focus this.quill.on('selection-change', range => { if (!range) {