Media & Text Focal Point Picker Producing Long Decimal Values #33615
Labels
[Block] Media & Text
Affects the Media & Text Block
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
When setting a focal point on Media & Text blocks, the
background-position
value sometimes isn't rounded correctly. For examples:55.00000000000001% 50%
for what should be 55% 50%56.99999999999999% 50%
for what should be 57%, 50%It does not impact every number. In my testing, I got the weird long decimals for 55-58% in both the X and Y axes.
This is extremely similar to an issue with Cover blocks in #18665 that was fixed in late 2019.
Step-by-step reproduction instructions
Expected behaviour
Value in code matches value in UI.
Note: Attempting to fix the values in the code editor results in "This block contains unexpected or invalid content."
Actual behaviour
Screenshots or screen recording (optional)
WordPress information
Device information
The text was updated successfully, but these errors were encountered: