Skip to content

Commit

Permalink
fix detection calcuations
Browse files Browse the repository at this point in the history
  • Loading branch information
ardentia committed Sep 13, 2023
1 parent 8afdfa5 commit e68f949
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion projects/ng-sq-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sq-ui/ng-sq-common",
"version": "2.0.1",
"version": "2.0.2",
"license": "MIT",
"private": false,
"description": "The core module for SQ-UI kit for Angular",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class ScrolledToBottomListenerDirective implements OnDestroy {
}

checkIfHasScrolledToBottom(element: HTMLElement) {
const hasScrolledToBottom = element.scrollTop > 0 ? ((element.scrollHeight - element.scrollTop) === element.clientHeight) : false;
const hasScrolledToBottom = element.scrollTop > 0 ? (Math.ceil(element.scrollHeight - element.scrollTop) <= element.clientHeight) : false;

if (hasScrolledToBottom) {
this.scrolledToBottom.emit();
Expand Down

0 comments on commit e68f949

Please sign in to comment.