mirror of
https://codeberg.org/emersion/gamja.git
synced 2025-02-17 19:40:15 -05:00
components/scroll-manager: relax scroll check
See https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#determine_if_an_element_has_been_totally_scrolled
This commit is contained in:
parent
331a2f0c4e
commit
c69869209f
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ export default class ScrollManager extends Component {
|
|||
|
||||
isAtBottom() {
|
||||
let target = this.props.target.current;
|
||||
return target.scrollTop >= target.scrollHeight - target.offsetHeight;
|
||||
return Math.abs(target.scrollHeight - target.clientHeight - target.scrollTop) <= 10;
|
||||
}
|
||||
|
||||
saveScrollPosition(scrollKey) {
|
||||
|
|
Loading…
Reference in a new issue