mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
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.
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user