Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix: Spacer Block: Make block work on unified toolbar and spotlight mode #9993
The blocks relied on is-selected class being present in block edit div. I just checked that when unified toolbar or spotlight modes are enabled the editor does not add this classes to the BlockEdit, this made it impossible to resize the spacer block.
This seems to be an old problem and not a recent regression as the block seems to always relied on the selector ".editor-block-list__block[data-type="core/spacer"].is-selected" which is not valid in this modes.
This PR reads the prop isSelected and in that case, adds an internal class is-selected that we can safely rely on.
How has this been tested?
I checked that if spotlight mode or unified toolbar options are enabled in master it is not possible to resize the block and in this branch, the problem got fixed.