From 88dd14d90b95fef73a2fd3e03a84f5ccf0c9415a Mon Sep 17 00:00:00 2001 From: Paulo Trentin Date: Mon, 1 Aug 2022 12:31:53 -0300 Subject: [PATCH] Reset focalPoint after replacing the cover image #28859 --- packages/block-library/src/cover/shared.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/cover/shared.js b/packages/block-library/src/cover/shared.js index c28f099b485235..0e18d28372764e 100644 --- a/packages/block-library/src/cover/shared.js +++ b/packages/block-library/src/cover/shared.js @@ -72,8 +72,9 @@ export function attributesFromMedia( setAttributes, dimRatio ) { id: media.id, alt: media?.alt, backgroundType: mediaType, + focalPoint: undefined, ...( mediaType === VIDEO_BACKGROUND_TYPE - ? { focalPoint: undefined, hasParallax: undefined } + ? { hasParallax: undefined } : {} ), } ); };