Skip to content

Commit 0c1efec

Browse files
authored
FIX: more resilient bottom of message check (discourse#21613)
1.0 lenience might not be enough in rare cases and there are no real consequences to slightly increase it.
1 parent 44d28cd commit 0c1efec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/chat/assets/javascripts/discourse/components/chat-channel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ export default class ChatLivePane extends Component {
10001000
#isBottomOfMessageVisible(element, container) {
10011001
const rect = element.getBoundingClientRect();
10021002
const containerRect = container.getBoundingClientRect();
1003-
// - 1.0 to account for rounding errors, especially on firefox
1004-
return rect.bottom - 1.0 <= containerRect.bottom;
1003+
// - 5.0 to account for rounding errors, especially on firefox
1004+
return rect.bottom - 5.0 <= containerRect.bottom;
10051005
}
10061006
}

0 commit comments

Comments
 (0)