fix: Adds a space after mention to improve UX (#7506)

This commit is contained in:
Nithin David Thomas 2023-07-12 06:07:37 +05:30 committed by GitHub
parent ec7434d000
commit c7bf93ef8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,11 +310,9 @@ export default {
userFullName: mentionItem.name, userFullName: mentionItem.name,
}); });
const tr = this.editorView.state.tr.replaceWith( const tr = this.editorView.state.tr
this.range.from, .replaceWith(this.range.from, this.range.to, node)
this.range.to, .insertText(` `);
node
);
this.state = this.editorView.state.apply(tr); this.state = this.editorView.state.apply(tr);
this.emitOnChange(); this.emitOnChange();
this.$track(CONVERSATION_EVENTS.USED_MENTIONS); this.$track(CONVERSATION_EVENTS.USED_MENTIONS);