diff --git a/CHANGELOG.md b/CHANGELOG.md index f883e49a880..9076069edaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Fixed a bug where element cards could overflow their containers within Live Preview. ([#14710](https://github.com/craftcms/cms/issues/14710)) - Fixed a bug where links within the Queue Manager utility weren’t styled like links. ([#14716](https://github.com/craftcms/cms/issues/14716)) - Fixed a bug where tooltips within element labels caused the element title to be read twice by screen readers. +- Fixed a styling issue when editing an entry without any meta fields. ([#14721](https://github.com/craftcms/cms/issues/14721)) ## 5.0.0 - 2024-03-26 diff --git a/src/base/Element.php b/src/base/Element.php index b67ddc9dd42..703dd10f5af 100644 --- a/src/base/Element.php +++ b/src/base/Element.php @@ -5365,7 +5365,7 @@ public function getSidebarHtml(bool $static): string { $components = []; - $metaFieldsHtml = $this->metaFieldsHtml($static); + $metaFieldsHtml = trim($this->metaFieldsHtml($static)); if ($metaFieldsHtml !== '') { $components[] = Html::tag('div', $metaFieldsHtml, ['class' => 'meta']) . Html::tag('h2', Craft::t('app', 'Metadata'), ['class' => 'visually-hidden']);