[wp-trac] [WordPress Trac] #53954: Non numeric value in focal point picker breaks cover block
WordPress Trac
noreply at wordpress.org
Wed Aug 18 15:42:25 UTC 2021
#53954: Non numeric value in focal point picker breaks cover block
---------------------------+-----------------------------
Reporter: AlexHolsgrove | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.8
Severity: normal | Keywords:
Focuses: ui |
---------------------------+-----------------------------
By entering a non numeric value into the left/top input fields for the
cover block focal point picker causes the block to error.
To test, enter a letter into either box, and the block will break,
displaying the message "This block has encountered an error and cannot be
previewed."
Viewing the code editor shows the values for attributes object-position
and data-object-position as NaN.
{{{
<!-- wp:cover {"url":"http://example.com/wp-content/uploads/2021/08
/placeholder-960x560-1.jpg","id":126,"focalPoint":{"x":null,"y":"0.50"}}
-->
<div class="wp-block-cover has-background-dim"><img class="wp-block-
cover__image-background wp-image-126" alt="" src="http://example.com/wp-
content/uploads/2021/08/placeholder-960x560-1.jpg" style="object-
position:NaN% 50%" data-object-fit="cover" data-object-position="NaN%
50%"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph
{"align":"center","placeholder":"Write titleā¦","fontSize":"large"} -->
<p class="has-text-align-center has-large-font-size"></p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover -->
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53954>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list