Skip to content

Commit 3323fbb

Browse files
authored
addEventListener('wheel', onWheel) add { passive: false } (#618)
1 parent 26ca77b commit 3323fbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/InputNumber.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ const InternalInputNumber = React.forwardRef(
524524
// React onWheel is passive and we can't preventDefault() in it.
525525
// That's why we should subscribe with DOM listener
526526
// https://stackoverflow.com/questions/63663025/react-onwheel-handler-cant-preventdefault-because-its-a-passive-event-listenev
527-
input.addEventListener('wheel', onWheel);
527+
input.addEventListener('wheel', onWheel, { passive: false });
528528
return () => input.removeEventListener('wheel', onWheel);
529529
}
530530
}, [onInternalStep]);

0 commit comments

Comments
 (0)