diff --git a/packages/block-editor/src/layouts/grid.js b/packages/block-editor/src/layouts/grid.js index cb34bbfe3c99e..a27d07b3854a2 100644 --- a/packages/block-editor/src/layouts/grid.js +++ b/packages/block-editor/src/layouts/grid.js @@ -234,12 +234,17 @@ function GridLayoutColumnsControl( { layout, onChange } ) { + onChange={ ( value ) => { + /** + * If the input is cleared, avoid switching + * back to "Auto" by setting a value of "1". + */ + const validValue = value !== '' ? value : '1'; onChange( { ...layout, - columnCount: value, - } ) - } + columnCount: validValue, + } ); + } } value={ columnCount } min={ 1 } label={ __( 'Columns' ) } @@ -248,7 +253,7 @@ function GridLayoutColumnsControl( { layout, onChange } ) { onChange( { ...layout,