From 99fffda5fa9d14282f6cae4e544fe347d9228009 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 28 Jul 2016 03:04:42 +0300 Subject: www: fix rid capture --- juick-www/src/main/static/scripts.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'juick-www/src/main/static') diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js index d620b643..6f5d40fa 100644 --- a/juick-www/src/main/static/scripts.js +++ b/juick-www/src/main/static/scripts.js @@ -570,17 +570,16 @@ ready(function () { if (content) { var pageMID = content.getAttribute('data-mid'); if (pageMID > 0) { - var rid; document.querySelectorAll('.msg-comments').forEach(function(e) { - rid = e.closest('li').id; e.addEventListener('click', function (e) { + var rid = e.target.closest('li').id; showMoreReplies(e.target, rid); e.preventDefault(); }); }); document.querySelectorAll('.a-thread-comment').forEach(function(e) { - rid = e.closest('li').id; e.addEventListener('click', function (e) { + var rid = e.target.closest('li').id; showCommentForm(pageMID, rid); e.preventDefault(); }); -- cgit v1.2.3