Selecting "Original Ratio" while cropping an image does not properly reset it. #69084
Open
3 of 6 tasks
Labels
[Package] Block editor
/packages/block-editor
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
This issue was originally reported on Trac.
When the
Original Ratio
is selected while cropping an image, an incorrect ratio is applied to the Image block. Additionally, since theOriginal Ratio
represents the default state, it should be pre-selected by default.The issue occurs due to a minor typo in the following line:
gutenberg/packages/block-editor/src/components/image-editor/aspect-ratio-dropdown.js
Line 96 in e850c68
Here, the key should be
ratio
instead ofaspect
, as the following code snippet destructuresratio
, notaspect
:gutenberg/packages/block-editor/src/components/image-editor/aspect-ratio-dropdown.js
Line 24 in e850c68
Step-by-step reproduction instructions
Toolbar Controls
toggleCrop
thenAspect Ratio
.Original
fromAspect Ratio
.original ratio
, it adds a fallback value.Screenshots, screen recording, code snippet
Screen.Recording.2025-02-07.at.11.55.11.AM.mov
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: