From 96c9ccf92b02ed94ee327b63d88077a34bccd649 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Fri, 23 Jun 2023 23:32:45 +0900 Subject: [PATCH] Buttons Block: Fix for orientation-based block movers (#51831) --- packages/block-library/src/buttons/edit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/buttons/edit.js b/packages/block-library/src/buttons/edit.js index 869968e5951a8..78be70ed9dc35 100644 --- a/packages/block-library/src/buttons/edit.js +++ b/packages/block-library/src/buttons/edit.js @@ -36,7 +36,7 @@ const DEFAULT_BLOCK = { }; function ButtonsEdit( { attributes, className } ) { - const { fontSize, style } = attributes; + const { fontSize, layout, style } = attributes; const blockProps = useBlockProps( { className: classnames( className, { 'has-custom-font-size': fontSize || style?.typography?.fontSize, @@ -59,8 +59,8 @@ function ButtonsEdit( { attributes, className } ) { { className: preferredStyle && `is-style-${ preferredStyle }` }, ], ], - templateInsertUpdatesSelection: true, + orientation: layout?.orientation ?? 'horizontal', } ); return
;