Skip to content

Commit d2549b1

Browse files
committed
fix: No need preventDefault without virtual
1 parent a95e1a2 commit d2549b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/List.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ export function RawList<T>(props: ListProps<T>, ref: React.Ref<ListRef>) {
249249
React.useEffect(() => {
250250
// Firefox only
251251
function onMozMousePixelScroll(e: Event) {
252-
e.preventDefault();
252+
if (inVirtual) {
253+
e.preventDefault();
254+
}
253255
}
254256

255257
componentRef.current.addEventListener('wheel', onRawWheel);

0 commit comments

Comments
 (0)