Skip to content

Wrong calculation in isElementAtTop method causing percentage scrollThreshold to fail in inverse mode #396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
HarryTranCustodio opened this issue Nov 2, 2023 · 1 comment

Comments

@HarryTranCustodio
Copy link

Hi please take look at line 271 of the index.tsx file

Screenshot 2023-11-02 160034

Shouldn't the correct calculation be (threshold.value / 100) * target.scrollHeight + clientHeight - target.scrollHeight + 1 ?

Because of this line, the scrollThreshold in inverse mode doesn't work when it's set as percentage.

@HarryTranCustodio HarryTranCustodio changed the title Wrong calculation in isElementAtTop method causing percentage scrollThreshold to fail Wrong calculation in isElementAtTop method causing percentage scrollThreshold to fail in inverse mode Nov 2, 2023
@FarahWe
Copy link

FarahWe commented May 1, 2024

any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants