Fix Safari overflow

This commit is contained in:
Dan Abramov
2023-12-23 20:08:51 +00:00
parent fe554b400d
commit 67420895ea
+4 -4
View File
@@ -116,8 +116,8 @@ function ListImpl<ItemT>(
contextScrollHandlers.onScroll?.( contextScrollHandlers.onScroll?.(
{ {
contentOffset: { contentOffset: {
x: window.scrollX, x: Math.max(0, window.scrollX),
y: window.scrollY, y: Math.max(0, window.scrollY),
}, },
} as any, // TODO: Better types. } as any, // TODO: Better types.
null as any, null as any,
@@ -128,8 +128,8 @@ function ListImpl<ItemT>(
if (isInsideVisibleTree) { if (isInsideVisibleTree) {
contextScrollHandlers.onScrollEndWeb?.({ contextScrollHandlers.onScrollEndWeb?.({
contentOffset: { contentOffset: {
x: window.scrollX, x: Math.max(0, window.scrollX),
y: window.scrollY, y: Math.max(0, window.scrollY),
}, },
}) })
} }