Skip to content

Commit a3536dd

Browse files
committed
fix: Explicitly set passive: false (#863)
1 parent 854a606 commit a3536dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/picker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,18 +226,20 @@ export default defineComponent({
226226
$el.addEventListener('touchcancel', this.onCancel)
227227

228228
if ('onwheel' in $el) {
229-
$el.addEventListener('wheel', this.onWheel)
229+
$el.addEventListener('wheel', this.onWheel, { passive: false })
230230
} else if ('onmousewheel' in $el) {
231231
// https://developer.mozilla.org/en-US/docs/Web/API/Element/mousewheel_event
232232
;($el as HTMLDivElement).addEventListener(
233233
'mousewheel',
234234
this.onWheel as any, // eslint-disable-line @typescript-eslint/no-explicit-any
235+
{ passive: false },
235236
)
236237
} else if ('onDOMMouseScroll' in $el) {
237238
// https://developer.mozilla.org/en-US/docs/Web/API/Element/DOMMouseScroll_event
238239
;($el as HTMLDivElement).addEventListener(
239240
'DOMMouseScroll',
240241
this.onWheel as any, // eslint-disable-line @typescript-eslint/no-explicit-any
242+
{ passive: false },
241243
)
242244
}
243245
$el.addEventListener('mousedown', this.onStart)

0 commit comments

Comments
 (0)