fix: Code comment and comment marker classes clash
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user