From 68f87f4048cf529e773fd4cb13ddab060b42c1b8 Mon Sep 17 00:00:00 2001 From: Midgard Date: Fri, 17 Jun 2022 14:03:27 +0200 Subject: [PATCH] Fix "not scrolled to bottom" glow when zoomed Allow 1px difference in isScrolledToBottom to allow for small differences that can occur when the page zoom has been set to e.g. 110% --- js/view/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/view/messages.js b/js/view/messages.js index 87f1635..228095b 100644 --- a/js/view/messages.js +++ b/js/view/messages.js @@ -169,7 +169,7 @@ function isScrolledToBottom() { const el = byId("channel_contents_wrapper"); const scrolledTo = el.clientHeight + el.scrollTop; - return scrolledTo >= el.scrollHeight; + return scrolledTo + 1 >= el.scrollHeight; } function checkScrolledToBottom() { if (isScrolledToBottom()) {