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

Scrollpanel: Scrollbar in wrong position on initial load #16508

Open
felixoehler opened this issue Oct 9, 2024 · 1 comment
Open

Scrollpanel: Scrollbar in wrong position on initial load #16508

felixoehler opened this issue Oct 9, 2024 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@felixoehler
Copy link

Describe the bug

On initial load the scrollbar isn't located correctly and is usually offset by quite a margin. If there shouldn't be a scrollbar at all it still displays.
The issue goes away as soon as you hover over the Scrollpanel component.

Environment

@angular/core 17.3.12
primeng 17.18.11

Chrome or Edge

I did observe the issue in various different applications as well es your own documentation

Reproducer

No response

Angular version

17.3.12

PrimeNG version

17.18.11

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.12.2

Browser(s)

Chrome 129.0.6668.90, Edge 129.0.2792.79

Steps to reproduce the behavior

Load the Scrollpanel documentation: https://primeng.org/scrollpanel
Scroll down to the Custom section where you can actually see the scrollbar
Observer the scrollbar being way to the right of where they should be.

Screenshot for reference of what I'm seeing:
image

Expected behavior

Scrollbar should display in the correct position on initial load already.
Scrollbar should display at all if it is not needed also on initial load already.

@felixoehler felixoehler added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 9, 2024
@felixoehler
Copy link
Author

I managed to workaround the issue by calling ScrollPanelComponent.moveBar() in my component within ngAfterViewChecked lifecycle hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant