diff options
Diffstat (limited to 'juick-www/src/main')
-rw-r--r-- | juick-www/src/main/static/scripts.js | 4 |
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); |