Skip to content

Commit

Permalink
Fix overlay issue when empty featured image is used in Cover Block (#…
Browse files Browse the repository at this point in the history
…59855)

* Fix overlay issue on placeholder

* Addressed feedback
  • Loading branch information
akasunil authored Mar 15, 2024
1 parent 18ac447 commit 9e0d5f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-library/src/cover/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ function CoverEdit( {
getPositionClassName( contentPosition )
);

const showOverlay =
url || ! useFeaturedImage || ( useFeaturedImage && ! url );

return (
<>
{ blockControls }
Expand All @@ -500,7 +503,7 @@ function CoverEdit( {
data-url={ url }
>
{ resizeListener }
{ ( ! useFeaturedImage || url ) && (
{ showOverlay && (
<span
aria-hidden="true"
className={ classnames(
Expand Down

1 comment on commit 9e0d5f3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 9e0d5f3.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8295602072
📝 Reported issues:

Please sign in to comment.