mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
fix: Retain focus after sending message in rich content editor (#2372)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
This commit is contained in:
@@ -136,9 +136,11 @@ export default {
|
||||
showCannedMenu(updatedValue) {
|
||||
this.$emit('toggle-canned-menu', !this.isPrivate && updatedValue);
|
||||
},
|
||||
value(newValue) {
|
||||
value(newValue = '') {
|
||||
if (newValue !== this.lastValue) {
|
||||
this.state = createState(newValue, this.placeholder, this.plugins);
|
||||
const { tr } = this.state;
|
||||
tr.insertText(newValue, 0, tr.doc.content.size);
|
||||
this.state = this.view.state.apply(tr);
|
||||
this.view.updateState(this.state);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user