diff --git a/packages/block-editor/src/hooks/layout.js b/packages/block-editor/src/hooks/layout.js index 349b716f258896..05712ca95a8741 100644 --- a/packages/block-editor/src/hooks/layout.js +++ b/packages/block-editor/src/hooks/layout.js @@ -269,7 +269,8 @@ function LayoutPanel( { setAttributes, attributes, name: blockName } ) { } function ChildLayoutPanel( { setAttributes, attributes } ) { - const { style: { layout = {} } = {} } = attributes; + const { style = {} } = attributes; + const { layout = {} } = style; const { selfStretch, flexSize } = layout; return ( @@ -311,6 +312,7 @@ function ChildLayoutPanel( { setAttributes, attributes } ) { onChange={ ( value ) => { setAttributes( { style: { + ...style, layout: { ...layout, flexSize: value,