Skip to content

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

Description

@meticoeus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions