-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Button Block: Only display buttons if the title attribute exists #17221
Comments
Problem still occurs when you add a new button to the buttons block with Gutenberg 7.2.0 |
What for example with arrow buttons where the arrow is added using a class and text is not necessary? Currently adding a space allows this button to be rendered but this is not a good way. |
Hi @dgaik-gg! Thanks much for the note about this! |
Describe the bug
Currently, a Button block without a
title
attribute still renders an empty button via the save function, leaving an empty<a>
on the page.To reproduce
Steps to reproduce the behavior:
Expected behavior
A button is not rendered unless the
title
attribute is entered, preventing empty buttons from displaying if it's not intentionally configured within the editor.Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Using Gutenberg 6.3, although it happens regardless of whether or not the plugin is active.
The text was updated successfully, but these errors were encountered: