diff --git a/packages/block-editor/src/components/block-list/block.js b/packages/block-editor/src/components/block-list/block.js index a95075c6f9b42..ff5915981acdf 100644 --- a/packages/block-editor/src/components/block-list/block.js +++ b/packages/block-editor/src/components/block-list/block.js @@ -161,6 +161,10 @@ function BlockListBlock( { !! wrapperProps[ 'data-align' ] && ! themeSupportsLayout; + // Support for sticky position in classic themes with alignment wrappers. + + const isSticky = className?.includes( 'is-position-sticky' ); + // For aligned blocks, provide a wrapper element so the block can be // positioned relative to the block column. // This is only kept for classic themes that don't support layout @@ -172,7 +176,7 @@ function BlockListBlock( { if ( isAligned ) { blockEdit = (
{ blockEdit } @@ -221,7 +225,7 @@ function BlockListBlock( { isTemporarilyEditingAsBlocks, }, dataAlign && themeSupportsLayout && `align${ dataAlign }`, - className + ! ( dataAlign && isSticky ) && className ), wrapperProps: restWrapperProps, isAligned,