diff --git a/packages/block-editor/src/components/block-draggable/use-scroll-when-dragging.js b/packages/block-editor/src/components/block-draggable/use-scroll-when-dragging.js index e7f869b2d3b0a8..aa66c27503cf98 100644 --- a/packages/block-editor/src/components/block-draggable/use-scroll-when-dragging.js +++ b/packages/block-editor/src/components/block-draggable/use-scroll-when-dragging.js @@ -55,6 +55,9 @@ export default function useScrollWhenDragging() { }, [] ); const scrollOnDragOver = useCallback( ( event ) => { + if ( ! scrollParentY.current ) { + return; + } const scrollParentHeight = scrollParentY.current.offsetHeight; const offsetDragStartPosition = dragStartY.current - scrollParentY.current.offsetTop;