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

Slider: [Violation] Non-passive event #5213

Closed
aeruggiero opened this issue Feb 5, 2024 · 2 comments
Closed

Slider: [Violation] Non-passive event #5213

aeruggiero opened this issue Feb 5, 2024 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@aeruggiero
Copy link

Describe the bug

Hi all,
the slider component generates the following error:
image

To reproduce, just go to the devtools in this page:
https://primevue.org/slider/#api

(I don't know why, but sometimes it shows, sometimes it doesn't)

Thanks!

Reproducer

https://stackblitz.com/edit/primevue-create-vue-typescript-issue-template-uqcxp8?file=src%2FApp.vue

PrimeVue version

3.47.2

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@aeruggiero aeruggiero added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 5, 2024
@mertsincan
Copy link
Member

Hi,

To be honest, I really don't know anything about this warning. But, I found; https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md

For now, I set a milestone for it. We'll review it before the milestone is released.

@mertsincan mertsincan 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 Feb 9, 2024
@mertsincan mertsincan added this to the 3.51.0 milestone Feb 9, 2024
@matthew-dean
Copy link

@mertsincan In short, any time you add an event listener to scroll, it should have { passive: true } set on it, otherwise you get a performance degradation. The only time you would not have passive: true is if you wanted to actually cancel the scroll event, which is almost never the case. So, any instances in the PrimeVue codebase that are using scroll event listeners must have passive set to true to avoid the warning.

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Mar 19, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Mar 19, 2024
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
Development

No branches or pull requests

4 participants