aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-28 02:01:21 +0300
committerGravatar Vitaly Takmazov2016-07-28 02:01:21 +0300
commit136be4dfda616a9c0ee68eb3c31c138b65ef567f (patch)
tree450192e080e18de70853eae2f442953d793ddd44 /juick-www/src
parent0083c4cf0acb81e976b892072cef672efdb47f7f (diff)
www: fix replies unfolding
Diffstat (limited to 'juick-www/src')
-rw-r--r--juick-www/src/main/static/scripts.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index d7c3ffe9..b9becc16 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -215,7 +215,9 @@ function onsubmitNewMessage() {
}
function showMoreReplies(el, id) {
- el.closest('li').querySelector('.msg-comments').style.display = 'none';
+ var foldedReplies = el.closest('li').querySelector('.msg-comments');
+ if (!foldedReplies) { return }
+ foldedReplies.style.display = 'none';
var replies = document.querySelectorAll('#replies>li'),
flagshow = 0,
@@ -370,7 +372,7 @@ function unfoldReply() {
while (el.style.display === 'none') {
el = el.previousElementSibling;
}
- showMoreReplies(el);
+ showMoreReplies(el, anchor);
window.location.replace(window.location.hash);
}
}