Parent blocks without inner blocks prints empty HTML tags on the front #63332
Labels
[Block] Buttons
Affects the Buttons Block
[Block] Columns
Affects the Columns Block
[Priority] Low
Used to indicate that the issue at hand isn't a top priority to address and can be handled later
[Type] Bug
An existing feature does not function as intended
Description
I found this issue with both the columns block and the buttons block, and it seemed appropriate to open one issue instead of two.
When you delete all inner button or column blocks, the parent, the wrapper, is still printed on the front of the website.
Of course, this is an edge case that should only happen if a user:
Step-by-step reproduction instructions
Create a new post.
Add a columns block and a buttons block.
Delete the inner blocks, and save.
View the post on the front, and view the source.
Confirm that the block is present on the page.
Screenshots, screen recording, code snippet
<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex"></div>
<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex"></div>
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: