From 3818a35d61c0b5b78dc8db361ceef964cf4d4ec8 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Wed, 20 Apr 2016 09:10:51 -0700 Subject: [PATCH] Don't scroll down to the OP if we're already above it. --- src/Monitoring/ReplyPruning.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Monitoring/ReplyPruning.coffee b/src/Monitoring/ReplyPruning.coffee index a91521235..effe0e26a 100644 --- a/src/Monitoring/ReplyPruning.coffee +++ b/src/Monitoring/ReplyPruning.coffee @@ -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