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: TypeError: Cannot read properties of null (reading 'scrollWidth') #4689

Closed
Rakasch opened this issue Oct 25, 2023 · 0 comments · Fixed by #4696
Closed

ScrollPanel: TypeError: Cannot read properties of null (reading 'scrollWidth') #4689

Rakasch opened this issue Oct 25, 2023 · 0 comments · Fixed by #4696
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Rakasch
Copy link
Contributor

Rakasch commented Oct 25, 2023

Describe the bug

I have Scrollpanels in a dialog.
When I close the dialog and happen to touch the scrollpanel before it acually closes, the ScrollPanel throws an error.
The Scrollpanel is calling the mouseover event.
But the $refs are null, because I already closed the dialog.

image

Reproducer

https://stackblitz.com/edit/34zr2e?file=src%2FApp.vue

PrimeVue version

3.37.0

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

Click the close Button of the Dialog.
Before the dialog closes move the mouse over the scrollpanel.
image

Expected behavior

eg. Instantly return from the moveBar function, if the $refs are null.

@Rakasch Rakasch 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 25, 2023
FlipWarthog added a commit to FlipWarthog/primevue that referenced this issue Oct 25, 2023
tugcekucukoglu added a commit that referenced this issue Oct 26, 2023
Fix #4689 - ScrollPanel: TypeError: Cannot read properties of null (reading 'scrollWidth')
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 26, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.38.0 milestone Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
2 participants