fix: Not possible to place caret within existing comment

closes #5268
This commit is contained in:
Tom Moor
2023-04-27 20:21:23 -04:00
parent 4f019b7a99
commit ef075c0fa2
2 changed files with 1 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ export default class Comment extends Mark {
new Plugin({
props: {
handleDOMEvents: {
mousedown: (view, event: MouseEvent) => {
mouseup: (view, event: MouseEvent) => {
if (
!(event.target instanceof HTMLSpanElement) ||
!event.target.classList.contains("comment-marker")
@@ -95,8 +95,6 @@ export default class Comment extends Mark {
const commentId = event.target.id.replace("comment-", "");
if (commentId) {
event.preventDefault();
event.stopPropagation();
this.options?.onClickCommentMark?.(commentId);
}