Skip to content

A platform for community discussion. Free, open, simple.

FIX: more resilient bottom of message check (#21613)

Joffrey JAFFEUX0c1efecddd49
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;
}
}