Skip to content

Commit 6a65145

Browse files
committed
fixed expanding comment threads breaking if their titles contain clickable elements
1 parent 7b6dfd1 commit 6a65145

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/assets/javascripts/comments.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ $(() => {
4141
window.hljs && hljs.highlightAll();
4242
}
4343

44-
$(document).on('click', '.post--comments-thread.is-inline a', async (ev) => {
44+
$(document).on('click', '.js--comment-link', async (ev) => {
4545
if (ev.ctrlKey || ev.metaKey) {
4646
return;
4747
}
4848

4949
ev.preventDefault();
5050

51-
const $tgt = $(ev.target);
51+
const $tgt = $(ev.currentTarget);
5252
const $threadId = $tgt.data('thread');
5353
const wrapper = getCommentThreadWrapper($tgt);
5454

0 commit comments

Comments
 (0)