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

fix: Slider: "Unable to preventDefault inside passive event listener invocation" in primevue_slider.js (touchmove) #6537

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

caryhgq
Copy link
Contributor

@caryhgq caryhgq commented Oct 8, 2024

This PR fixes #5745.

The event.preventDefault() method has been removed.

The touch event uses the .passive modifier, and also uses the preventDefault method. On mobile devices, the browser will report an error.

The official documentation for Vue.js is as follows:

https://vuejs.org/guide/essentials/event-handling.html#event-modifiers

Do not use .passive and .prevent together, because .passive already indicates to the browser that you do not intend to prevent the event's default behavior, and you will likely see a warning from the browser if you do so.

###Defect Fixes
When submitting a PR, please also create an issue documenting the error.

###Feature Requests
Due to company policy, we are unable to accept feature request PRs with significant changes as such cases has to be implemented by our team following our own processes.

The event.preventDefault() method has been removed.

The touch event uses the .passive modifier, and also uses the preventDefault method. On mobile devices, the browser will report an error.

The official documentation for Vue.js is as follows:

https://vuejs.org/guide/essentials/event-handling.html#event-modifiers

Do not use .passive and .prevent together, because .passive already indicates to the browser that you do not intend to prevent the event's default behavior, and you will likely see a warning from the browser if you do so.
Copy link

vercel bot commented Oct 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 1:17am
primevue-v3 ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 1:17am

@tugcekucukoglu
Copy link
Member

Please create an issue while sending PR.

@tugcekucukoglu tugcekucukoglu added the Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. label Oct 8, 2024
@caryhgq caryhgq changed the title Update Slider.vue fix: Slider: "Unable to preventDefault inside passive event listener invocation" in primevue_slider.js (touchmove) Oct 8, 2024
@tugcekucukoglu tugcekucukoglu merged commit 2a9ac8b into primefaces:master Nov 11, 2024
3 checks passed
@caryhgq caryhgq deleted the patch-1 branch November 13, 2024 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slider: "Unable to preventDefault inside passive event listener invocation" in primevue_slider.js (touchmove)
2 participants