Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kryzanivska-nastya committed Dec 19, 2024
1 parent 26f0c86 commit 2c147f3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ export class CommentTextareaComponent implements OnInit, AfterViewInit, OnChange

onCommentTextareaFocus(): void {
const currentText = this.commentTextarea.nativeElement.textContent.trim();
if (currentText === 'Add a comment' || currentText === '') {
this.commentTextarea.nativeElement.textContent = '';
}
if (Patterns.urlLinkifyPattern.test(currentText)) {
this.commentTextarea.nativeElement.innerHTML = this.renderLinks(currentText);
this.initializeLinkClickListeners(this.commentTextarea.nativeElement);
Expand Down

0 comments on commit 2c147f3

Please sign in to comment.