Skip to content

ScrollPanel scrollbar calculations are incorrect #8440

@nhruch

Description

@nhruch

Describe the bug

When content exceeds a certain size in either the horizontal or vertical axis, the scroll bar calculation becomes incorrect and overflows the component boundaries at 100%.

Reproducer

https://gitlab.com/stackhound/primereact-scrollpanel-bug

System Information

System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13900KF
    Memory: 26.06 GB / 31.26 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.17.0 - /home/nrhruch/.nvm/versions/node/v20.17.0/bin/node
    npm: 10.8.2 - /home/nrhruch/.nvm/versions/node/v20.17.0/bin/npm
    pnpm: 9.11.0 - /home/nrhruch/.local/share/pnpm/pnpm
  npmPackages:
    primereact: ^10.9.7 => 10.9.7 
    react: ^19.2.0 => 19.2.3

Steps to reproduce the behavior

I have it in a gitlab project right now. You can clone and run it. Toggle between small and large content to see the issue.

Expected behavior

The scrollbars should calculate its position correctly regardless of content size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions