Skip to content
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

fix: add thresholdOffset for infinite scrolling #1616

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nhtoby311
Copy link

@nhtoby311 nhtoby311 commented Aug 17, 2023

Why

Regarding this bug #1615, on some device and browser combination, the scroll does not reach the scrollThreshold, therefore, it does not reset the scroll bar back to top, and results in broken infinite scroll effect.

What

I simply add a props name thresholdOffset to offset this scrollThreshold.

Could not identify the reason why the calculation of current scroll position is off by ~0.44 in my test using Samsung A53 with Chrome, as it varied between device and browser. However, I think this solution at least give us the option to tackle these edge cases.

image

Checklist

  • Documentation updated (example)
  • Ready to be merged

@vercel
Copy link

vercel bot commented Aug 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 17, 2023 3:41pm

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 17, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ab345fa:

Sandbox Source
intelligent-tamas-mqlnn9 Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration

@nhtoby311 nhtoby311 changed the title fix: add thresholdOffset for infinite scrolling fix: add thresholdOffset for infinite scrolling Aug 17, 2023
@drcmda
Copy link
Member

drcmda commented Sep 4, 2023

but this would require knowledge around these edge cases and magic numbers deployed in user land. 😕 did you find any more info on why these platforms never reach the threshold?

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

Successfully merging this pull request may close these issues.

None yet

2 participants