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: Errors in moveBar() when xBar and yBar attributes don't exist #5518

Closed
autoboxer opened this issue Apr 3, 2024 · 2 comments · Fixed by #5519 or DallinAllred/ezanalytics#11 · May be fixed by jennytoc/mfe-proj#2
Closed
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@autoboxer
Copy link
Contributor

Describe the bug

In some cases, the requestAnimationFrame() that sets attributes for this.$refs.xBar and this.$refs.yBarthrow errors due to neitherxBarnoryBarexisting onthis.$refs`.

screenshot

ScrollPanel Error

Reproducer

none - PR incoming though

PrimeVue version

3.50.0

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

Chrome 123.0.6312.87

Steps to reproduce the behavior

This doesn't seem to happen in all cases and is hard to reproduce, but in my case it's due to a scrollbar which doesn't need to be rendered, being placed in a Panel which takes up 1/3 of the screen width. When it does occur, it happens on load, before the ScrollPanel is interacted with in any way.

Expected behavior

No errors are thrown due to the ScrollPanel component loading.

@autoboxer autoboxer added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 3, 2024
autoboxer added a commit to autoboxer/primevue that referenced this issue Apr 3, 2024
autoboxer added a commit to autoboxer/primevue that referenced this issue Apr 3, 2024
@tugcekucukoglu
Copy link
Member

How can we replicate this issue? Could you share a stackblitz link?

@tugcekucukoglu tugcekucukoglu added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 4, 2024
@autoboxer
Copy link
Contributor Author

although it's happening consistently in my app, I haven't been able to easily replicate the issue. I'll hopefully free up a bit next week and can try to put something together, but may not be able to showcase the same behavior in a sandbox environment. I was hoping the error showing that there are cases where xBar and yBar are not set as expected when the requestAnimationFrame is run would be adequate, but I completely understand if it's not.

tugcekucukoglu added a commit that referenced this issue Apr 19, 2024
fix #5518: prevent erros thrown by ScrollPanel loading
@tugcekucukoglu tugcekucukoglu added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Apr 19, 2024
@tugcekucukoglu tugcekucukoglu added this to the 3.52.0 milestone Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
2 participants