Search block's button text escapes container when block is set to only display the button #54842
Labels
[Block] Search
Affects the Search Block - used to display a search field
[Status] In Progress
Tracking issues with work in progress
[Type] Regression
Related to a regression in the latest release
Description
I first noticed that this behavior first arose in 16.6; did not occur in 16.4. Likely Introduced in #53373
When you have a search block, hide the search field and only display the button but replace the icon with text (e.g. 'search') the text escapes the button's container.
@ramonjd tried to fix a similar issue with #54773 when only the icon is displayed. Unfortunately, I'm still able to reproduce this issue after applying that PR.
I'm able to reproduce this on a custom block theme as well as on Tova, as well as Twenty-twenty-three.
Step-by-step reproduction instructions
Create or edit a navigation block in a theme and include with the following markup:
<!-- wp:search {"showLabel":false,"buttonText":"Search","buttonPosition":"button-only","isSearchFieldHidden":true} /-->
Save changes
view changes on front-end of website
Screenshots, screen recording, code snippet
Tova:
![Selection_330](https://private-user-images.githubusercontent.com/955351/270786435-0ba3e1d4-4cd6-450c-b114-bee78923689e.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNDI4NTIsIm5iZiI6MTczOTI0MjU1MiwicGF0aCI6Ii85NTUzNTEvMjcwNzg2NDM1LTBiYTNlMWQ0LTRjZDYtNDUwYy1iMTE0LWJlZTc4OTIzNjg5ZS5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwMjU1NTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kYTEwZmI4ODQzYzk4NTQ2NTk4YTkxMzA5NzNmNGNiNmM4MzA0ZjA1NzA0ZmY2NjI1OWIxMjhiZjRiMTk4ZWYxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.MbDaymJ-7BLPdXy0v5rStrmRvBMSKADwXdQ-pJzOtMY)
My custom theme:
![Selection_332](https://private-user-images.githubusercontent.com/955351/270785137-543ba253-9b7c-4f98-a839-2422407aaea7.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNDI4NTIsIm5iZiI6MTczOTI0MjU1MiwicGF0aCI6Ii85NTUzNTEvMjcwNzg1MTM3LTU0M2JhMjUzLTliN2MtNGY5OC1hODM5LTI0MjI0MDdhYWVhNy5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwMjU1NTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02YmY5MjFmNmE2ODFmM2Q3MjIxMzgzNWMyY2M3YzEzZDVjOTJlMGEwMTJiNTljOTZmZjdiZWExZWY2MzBjOGUxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.b4Dcn0_o2ZLEaIXY-Bsn1OXtk95d8eiq-lpcKZ6lYfo)
Environment info
WP 6.3.1, gutenberg built from trunk from today, 2023-09-26 (tagged as 16.7.0-rc.2; last commit
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: