Buttons block: justification setting ignored when the block is selected #33487
Labels
[Block] Buttons
Affects the Buttons Block
[Status] In Progress
Tracking issues with work in progress
[Type] Regression
Related to a regression in the latest release
Milestone
Description
Setting alignment for a button does not update its position until it loses focus.
Step-by-step reproduction instructions
Expected behaviour
The button will respond to a new alignment immediately.
Actual behaviour
The button alignment does not update until it loses focus. This also occurs when a button receives focus again.
Screenshots or screen recording (optional)
WordPress 5.7.2: alignment updates immediately
WordPress 5.8-beta3: alignment does not update immediately
Code snippet (optional)
It looks like the right margin being set to
auto
for the block appender is the cause? A child of a flexbox element will be pushed in the opposite direction to the side its auto margin is applied. A block appender is injected as a new child of the flexbox element when a button receives focus, causing the contents of the Buttons block to be pushed to the left.WordPress information
Device information
The text was updated successfully, but these errors were encountered: