diff --git a/src/app/components/shared/write-comment/write-comment.component.ts b/src/app/components/shared/write-comment/write-comment.component.ts index 0343ea6f113ce616bfd2f94bcde384615dee5e58..5889eaef166febce44b0d4b72e7e4ea9e791167b 100644 --- a/src/app/components/shared/write-comment/write-comment.component.ts +++ b/src/app/components/shared/write-comment/write-comment.component.ts @@ -164,7 +164,6 @@ export class WriteCommentComponent implements OnInit { this.commentData.currentData = data; this.commentData.copyMarks(view); } - this.isSpellchecking = false; }); }, () => { this.isSpellchecking = false; @@ -188,6 +187,7 @@ export class WriteCommentComponent implements OnInit { target = TargetLang.DE; } this.generateDeeplDelta(body, target).subscribe(([improvedBody, improvedText]) => { + this.isSpellchecking = false; if (improvedText.replace(/\s+/g, '') === text.replace(/\s+/g, '')) { onClose(body, text, this.commentData); return; @@ -208,6 +208,7 @@ export class WriteCommentComponent implements OnInit { } }); }, (_) => { + this.isSpellchecking = false; onClose(body, text, this.commentData); }); }