diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts index 6fe93455a..3d29b152a 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts @@ -563,7 +563,7 @@ h6 { opacity: 1; } -.comment { +.comment-marker { border-bottom: 2px solid ${transparentize(0.5, props.theme.brand.marine)}; transition: background 100ms ease-in-out; cursor: pointer; @@ -1463,7 +1463,7 @@ del[data-operation-index] { display: none; } - .comment { + .comment-marker { border: 0; background: none; } diff --git a/shared/editor/marks/Comment.ts b/shared/editor/marks/Comment.ts index b99f3e2e8..29954842f 100644 --- a/shared/editor/marks/Comment.ts +++ b/shared/editor/marks/Comment.ts @@ -21,10 +21,10 @@ export default class Comment extends Mark { userId: {}, }, inclusive: false, - parseDOM: [{ tag: "span.comment" }], + parseDOM: [{ tag: "span.comment-marker" }], toDOM: (node) => [ "span", - { class: "comment", id: `comment-${node.attrs.id}` }, + { class: "comment-marker", id: `comment-${node.attrs.id}` }, ], }; } @@ -88,7 +88,7 @@ export default class Comment extends Mark { mousedown: (view, event: MouseEvent) => { if ( !(event.target instanceof HTMLSpanElement) || - !event.target.classList.contains("comment") + !event.target.classList.contains("comment-marker") ) { return false; }