From 52036c1f120108ff97344ad946f3fd4a10b682fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Trzci=C5=84ski?= Date: Tue, 24 Sep 2024 13:58:30 +0200 Subject: [PATCH] [#66224] use click instead of mouseup on comment icons --- src/comments/sidebarWidget.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comments/sidebarWidget.js b/src/comments/sidebarWidget.js index bd60f97..1c7437d 100644 --- a/src/comments/sidebarWidget.js +++ b/src/comments/sidebarWidget.js @@ -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(); @@ -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);