diff --git a/src/VirtList.tsx b/src/VirtList.tsx index c7316a7..8f79c3e 100644 --- a/src/VirtList.tsx +++ b/src/VirtList.tsx @@ -513,13 +513,13 @@ function useVirtList>( // 兼容性处理,详情:https://developer.mozilla.org/zh-CN/docs/Web/API/ResizeObserver // ios中没有borderBoxSize,只有contentRect if (entry.borderBoxSize) { - // Firefox implements `contentBoxSize` as a single content rect, rather than an array - const contentBoxSize = Array.isArray(entry.contentBoxSize) - ? entry.contentBoxSize[0] - : entry.contentBoxSize; + // Firefox implements `borderBoxSize` as a single content rect, rather than an array + const borderBoxSize = Array.isArray(entry.borderBoxSize) + ? entry.borderBoxSize[0] + : entry.borderBoxSize; newSize = props.horizontal - ? contentBoxSize.inlineSize - : contentBoxSize.blockSize; + ? borderBoxSize.inlineSize + : borderBoxSize.blockSize; } else { newSize = props.horizontal ? entry.contentRect.width