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:
parent
b1228f805e
commit
f731002b70
1 changed files with 4 additions and 2 deletions
|
@ -136,9 +136,11 @@ export default {
|
||||||
showCannedMenu(updatedValue) {
|
showCannedMenu(updatedValue) {
|
||||||
this.$emit('toggle-canned-menu', !this.isPrivate && updatedValue);
|
this.$emit('toggle-canned-menu', !this.isPrivate && updatedValue);
|
||||||
},
|
},
|
||||||
value(newValue) {
|
value(newValue = '') {
|
||||||
if (newValue !== this.lastValue) {
|
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);
|
this.view.updateState(this.state);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue