From 5e1acab801f156a8c788592743a271ddb44f443e Mon Sep 17 00:00:00 2001 From: caryhuang Date: Tue, 8 Oct 2024 09:16:38 +0800 Subject: [PATCH] Update Slider.vue 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. --- packages/primevue/src/slider/Slider.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/primevue/src/slider/Slider.vue b/packages/primevue/src/slider/Slider.vue index c6caa6bfe..e69cb512c 100755 --- a/packages/primevue/src/slider/Slider.vue +++ b/packages/primevue/src/slider/Slider.vue @@ -155,12 +155,10 @@ export default { } event.currentTarget.focus(); - event.preventDefault(); }, onDrag(event) { if (this.dragging) { this.setValue(event); - event.preventDefault(); } }, onDragEnd(event) {