aboutsummaryrefslogtreecommitdiff
path: root/juick-www
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www')
-rw-r--r--juick-www/src/main/static/scripts.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index 94b6ba65..a5f7c4c0 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -156,7 +156,9 @@ function wsIncomingReply(msg) {
if (isTreeMode() && (msg.replyto > 0)) {
var p = document.getElementById(msg.replyto);
- li.style.marginLeft = parseInt(p.style.marginLeft) + 20 + 'px';
+ var m = parseInt(p.style.marginLeft) + 20;
+ while (p.nextElementSibling && (parseInt(p.nextElementSibling.style.marginLeft) == m)) p = p.nextElementSibling;
+ li.style.marginLeft = m + 'px';
p.parentNode.insertBefore(li, p.nextSibling);
} else {
document.getElementById('replies').appendChild(li);