Skip to content

Commit e68f949

Browse files
author
ardentia
committed
fix detection calcuations
1 parent 8afdfa5 commit e68f949

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

projects/ng-sq-common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sq-ui/ng-sq-common",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"license": "MIT",
55
"private": false,
66
"description": "The core module for SQ-UI kit for Angular",

projects/ng-sq-common/src/lib/directives/scrolled-to-bottom-listener.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class ScrolledToBottomListenerDirective implements OnDestroy {
1717
}
1818

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

2222
if (hasScrolledToBottom) {
2323
this.scrolledToBottom.emit();

0 commit comments

Comments
 (0)