diff --git a/packages/virtualized-lists/Lists/VirtualizedList.js b/packages/virtualized-lists/Lists/VirtualizedList.js index 7a48d91be4d0..ef54a4af2545 100644 --- a/packages/virtualized-lists/Lists/VirtualizedList.js +++ b/packages/virtualized-lists/Lists/VirtualizedList.js @@ -627,7 +627,9 @@ class VirtualizedList extends StateSafePureComponent< } else { // If we have a pending scroll update, we should not adjust the render window as it // might override the correct window. - if (pendingScrollUpdateCount > 0) { + // We only block the update if the content is large enough to scroll, otherwise + // we might never receive a scroll event to clear the pending update. + if (pendingScrollUpdateCount > 0 && contentLength > visibleLength) { return cellsAroundViewport.last >= getItemCount(data) ? VirtualizedList._constrainToItemCount(cellsAroundViewport, props) : cellsAroundViewport; diff --git a/packages/virtualized-lists/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap b/packages/virtualized-lists/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap index 80eb159051de..35cb0ae3f070 100644 --- a/packages/virtualized-lists/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap +++ b/packages/virtualized-lists/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap @@ -4865,12 +4865,21 @@ exports[`renders new items when data is updated with non-zero initialScrollIndex /> + onFocusCapture={[Function]} + style={null} + > + + + + + `;