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; },