Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.
This repository was archived by the owner on Sep 30, 2025. It is now read-only.

Scrollable is not triggering "onScrolledToBottom" when css height property is not set to a discrete value #8088

@brandon-yetman

Description

@brandon-yetman

Issue summary

Discovered this issue as part of an investigation into https://github.com/Shopify/core-issues/issues/49748
I suspect the issue was caused by this PR #7635

Note: Once this fix is shipped and deployed, we should revert this Web PR: https://github.com/Shopify/web/pull/82073

Expected behavior

The onScrolledToBottom function should trigger when the scollable is scrolled to the bottom, regardless of the height property that has been set on the scrollable

Actual behavior

The onScrolledToBottom function does not trigger when the scrollable reaches the bottom when the scrollable is provided a non-discrete height propert (e.g. "100%")

Steps to reproduce the problem

  • When the height property is set to a discrete value such as 100px the onScrolledToBottom function triggers normally when the scrollable reaches the bottom
  • However when the height is set to something like 100% or not provided, the onScrolledToBottom function does not trigger when the scrollable reaches the bottom

Reduced test case

CodeSandbox

Specifications

  • Are you using the React components? (Y/N): Y
  • Polaris version number: 10.21.0
  • Browser: Chrome
  • Device: M1 Pro
  • Operating System: Ventura 13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is broken and not working as intended in the system.no-issue-activityuntriaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions