diff --git a/packages/block-editor/src/components/list-view/branch.js b/packages/block-editor/src/components/list-view/branch.js index 6432805fa61fe9..2cc530fce84fca 100644 --- a/packages/block-editor/src/components/list-view/branch.js +++ b/packages/block-editor/src/components/list-view/branch.js @@ -101,33 +101,10 @@ export default function ListViewBranch( props ) { } const usesWindowing = __experimentalPersistentListViewFeatures; - const { - start, - end, - itemInView, - startPadding, - endPadding, - } = fixedListWindow; + const { itemInView } = fixedListWindow; const blockInView = ! usesWindowing || itemInView( nextPosition ); - const isDragging = draggedClientIds?.length > 0; - if ( - usesWindowing && - ! isDragging && - ! blockInView && - nextPosition > start - ) { - // found the end of the window, don't bother processing the rest of the items - break; - } - const style = usesWindowing - ? { - paddingTop: start === nextPosition ? startPadding : 0, - paddingBottom: end === nextPosition ? endPadding : 0, - } - : undefined; - const position = index + 1; const isLastRowAtLevel = rowCount === position; const updatedTerminatedLevels = isLastRowAtLevel @@ -192,9 +169,15 @@ export default function ListViewBranch( props ) { path={ updatedPath } isExpanded={ isExpanded } listPosition={ nextPosition } - style={ style } /> ) } + { ! isDragged && ! blockInView && ( +