Open etwodev opened 1 week ago
I didn't reproduce on codesandbox environment, Has Reached Bottom
become true :cry:
I didn't reproduce on codesandbox environment,
Has Reached Bottom
become true 😢
Can confirm this issue doesn't seem present in Firefox, not sure about Safari, but it seems reproducible in Chrome Possibly only macOS chrome...
I see, I'll check it again on macos thanks! I was using Ubuntu...
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: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop
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