-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
ScrollArea onButtonReached does not call with decimal values #6792
Comments
I didn't reproduce on codesandbox environment, |
Can confirm this issue doesn't seem present in Firefox, not sure about Safari, but it seems reproducible in Chrome |
I see, I'll check it again on macos thanks! I was using Ubuntu... |
Also realised my example was wrong, issue should persist in Firefox now :) But it is likely due to the fact it's dependent on your device Regardless, the experience is super inconsistent and doesn't ignore the fact that scrollTop can be decimal: |
… the viewport has decimal px height value (#6792)
Fixed in 7.13.2 |
It still doesn't work in some cases. In my case, when using https://codesandbox.io/p/sandbox/mantine-react-template-forked-g7jynq I tried the solution presented by @etwodev and it worked. I passed the
Therefore, it seems that this solution is more correct than the current one. |
Dependencies check up
What version of @mantine/* packages do you have in package.json?
^7.12.2
What package has an issue?
@mantine/core
What framework do you use?
Next.js
In which browsers you can reproduce the issue?
Chrome
Describe the bug
in ScrollArea there are instances where
scrollTop
is fractional, meaningonBottomReached
will never be called - as this edge case is not handled, seen below:If
scrollTop
was a value such as 495.5,scrollHeight
at 696 andclientHeight
at 200, this would not call, despite being unable to scroll further.If possible, include a link to a codesandbox with a minimal reproduction
https://codesandbox.io/p/sandbox/mantine-react-template-forked-wtx8tg
Possible fix
Replace
with
Self-service
The text was updated successfully, but these errors were encountered: