Don't scroll down to the OP if we're already above it.

This commit is contained in:
ccd0 2016-04-20 09:10:51 -07:00
parent 75a01d2185
commit 3818a35d61

View File

@ -126,6 +126,7 @@ ReplyPruning =
ReplyPruning.summary.hidden = (ReplyPruning.total <= +Conf["Max Replies"])
# Maintain position in thread when posts are added/removed above
window.scroll window.scrollX, Math.max(d.body.clientHeight - oldPos, window.scrollY + Header.getTopOf $('.board'))
if (boardTop = Header.getTopOf $('.board')) < 0
window.scroll window.scrollX, Math.max(d.body.clientHeight - oldPos, window.scrollY + boardTop)
return ReplyPruning