diff --git a/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts b/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts index 3cd2b445..65e42c5a 100644 --- a/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts +++ b/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts @@ -331,6 +331,7 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit { private checkContentLength() { const result = this.parseContent(); if (!result) { + this.contentLength = 0; return; } @@ -572,6 +573,7 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit { } else { this.editor.nativeElement.appendChild(node); } + selection.empty(); } private inEditor(el) {