diff --git a/projects/ng-sq-common/package.json b/projects/ng-sq-common/package.json index 74e79ff7..cf9b5c83 100644 --- a/projects/ng-sq-common/package.json +++ b/projects/ng-sq-common/package.json @@ -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", diff --git a/projects/ng-sq-common/src/lib/directives/scrolled-to-bottom-listener.directive.ts b/projects/ng-sq-common/src/lib/directives/scrolled-to-bottom-listener.directive.ts index 336c0ce4..a12be2c7 100644 --- a/projects/ng-sq-common/src/lib/directives/scrolled-to-bottom-listener.directive.ts +++ b/projects/ng-sq-common/src/lib/directives/scrolled-to-bottom-listener.directive.ts @@ -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();