From 114019c4d82c88000686a4926811e85a38c5ce00 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 22 Mar 2023 21:49:52 -0400 Subject: [PATCH] fix: Comment thread not focused correctly when clicking on mark, closes #5081 --- shared/editor/marks/Comment.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared/editor/marks/Comment.ts b/shared/editor/marks/Comment.ts index 29954842f..5b137f2d0 100644 --- a/shared/editor/marks/Comment.ts +++ b/shared/editor/marks/Comment.ts @@ -94,7 +94,11 @@ export default class Comment extends Mark { } const commentId = event.target.id.replace("comment-", ""); - this.options?.onClickCommentMark?.(commentId); + if (commentId) { + event.preventDefault(); + event.stopPropagation(); + this.options?.onClickCommentMark?.(commentId); + } return false; },