From 0c1efecddd49e07ce1e990634a0fb296ec5f4da6 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 17 May 2023 18:05:18 +0200 Subject: [PATCH] FIX: more resilient bottom of message check (#21613) 1.0 lenience might not be enough in rare cases and there are no real consequences to slightly increase it. --- .../assets/javascripts/discourse/components/chat-channel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel.js b/plugins/chat/assets/javascripts/discourse/components/chat-channel.js index d1c83a1eacc..d81ca7c79c7 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-channel.js +++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel.js @@ -1000,7 +1000,7 @@ export default class ChatLivePane extends Component { #isBottomOfMessageVisible(element, container) { const rect = element.getBoundingClientRect(); const containerRect = container.getBoundingClientRect(); - // - 1.0 to account for rounding errors, especially on firefox - return rect.bottom - 1.0 <= containerRect.bottom; + // - 5.0 to account for rounding errors, especially on firefox + return rect.bottom - 5.0 <= containerRect.bottom; } }