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

When page size does not fill user's screen, scrolling does not trigger onInfiniteLoad #20

Open
meticoeus opened this issue Apr 8, 2017 · 1 comment

Comments

@meticoeus
Copy link

If the user has a particularly tall screen, like a tablet in portrait mode, 1 loaded page may not fill their screen. When this happens ChatView does not call onInfiniteLoad when the you attempt to scroll.

I'm currently working around this using react-measure to trigger a load any time the height inside of ChatView is less than height outside ChatView. I'd prefer not to rely on significantly increasing page size to make this event unlikely but still plausible.

Maybe isPassedThreshold should detect the scroll section being too small to possibly trigger when scrollHeight < clientHeight and return true in that case?

Reproducing should be easy. Just open the demo and use Chrome's zoom feature to zoom out to 50% or smaller until the first page loads all at once, then try to scroll up. Using latest Chrome canary, this reproduces the issue for me.

@meticoeus
Copy link
Author

I've done some experimentation with onScroll and isPassedThreshold and it seems onScroll is never triggered if the div is too small to scroll when using passive event listeners.

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

1 participant