Skip to content

Commit

Permalink
[#66224] use click instead of mouseup on comment icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Trzcin committed Sep 24, 2024
1 parent 0cc9ddb commit 52036c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/comments/sidebarWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CommentMarker extends GutterMarker {
this.icon.onmouseenter = () => this.icon.classList.add(CommentMarker.COMMENT_IMAGE_CLASS);
this.icon.onmouseleave = () => this.icon.classList.remove(CommentMarker.COMMENT_IMAGE_CLASS);
} else {
this.icon.onmouseup = () => this.ycomments.display().switchVisibility(this.commentId);
this.icon.onclick = () => this.ycomments.display().switchVisibility(this.commentId);
this.icon.onmouseenter = () => {
this.ycomments.commentWithPopup = this.commentId;
this.ycomments.updateMainCodeMirror();
Expand Down Expand Up @@ -96,7 +96,7 @@ const commentMarker = gutter({
return new CommentMarker(null, null);
},
domEventHandlers: {
mouseup(view, line) {
click(view, line) {
let ycomments = view.state.facet(ycommentsFacet.reader);
let commentId = getOrCreateComment(view, line, ycomments);
ycomments.display().switchVisibility(commentId);
Expand Down

0 comments on commit 52036c1

Please sign in to comment.