Skip to content

Issue with Lane Pagination due to micro difference between scrollTop and scrollHeight. #422

Closed
@deve-sh

Description

const elemScrollPosition = node.scrollHeight - node.scrollTop - node.clientHeight

Hey There, thanks for the brilliant library, it's very useful. I have an issue with the lane pagination. The issue isn't directly reproducable but is noticeable at certain times due to screen size differences and the ways in which the lane scroll container is styled.

It is noticeable in certain scenarios that scrollHeight or scrollTop are off by a margin of less than 1px, for example: Instead of 692px they will be 691.45555555px. The elemScrollPosition variable might be greater than 0 in some cases due to that even though the user has scrolled all the way down and is expecting more cards to load.

Suggest using something like Math.floor or Math.ceil in combination with node.offsetHeight to counter that issue.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions