Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#49073 closed defect (bug) (fixed)

Edit Media aspectratio-free selection not possible after setting aspect ratio once

Reported by: tbschen's profile TBschen Owned by: antpb's profile antpb
Milestone: 5.4 Priority: normal
Severity: minor Version: 5.3.2
Component: Media Keywords: has-patch commit
Focuses: javascript Cc:

Description

Go to media, edit an image, click on the Edit Image button
If you select part of the image, you can freely decide its selection (works).
If you enter an aspect ratio on the right and delete the numbers afterwards, your aspect ratio is still what was entered before. You can't get a aspectratio-free selection anymore until you reload.

Attachments (1)

49073.diff (398 bytes) - added by valentinbora 5 years ago.
Reset aspect ratio constraints when one of the width/height fields fails numeric validation.

Download all attachments as: .zip

Change History (7)

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


5 years ago

#2 @antpb
5 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.4

Thanks for this report @TBschen! Great first ticket! @pbiron confirmed that this behavior is indeed as you describe. I’m setting the milestone to 5.4 and will try to get this in the timeline of the release.

@valentinbora
5 years ago

Reset aspect ratio constraints when one of the width/height fields fails numeric validation.

#3 @valentinbora
5 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

This ticket was mentioned in Slack in #core-media by valentinbora. View the logs.


5 years ago

#5 @antpb
5 years ago

  • Keywords commit added; needs-testing removed

This works great! In my testing everything works as it should. I definitely confirmed the stuck aspect ratio before the patch and after building with it on my local, it seems to be working as expected. Thank you so much for this! Is this your first props @valentinbora ? If so, what a great first contribution. :D Marking this for commit as I prepare to do all the things to make that happen.

#6 @antpb
5 years ago

  • Owner set to antpb
  • Resolution set to fixed
  • Status changed from new to closed

In 47262:

Media: Reset aspect ratio constraints when width and height fields fail numeric validation.

Props TBschen, valentinbora.
Fixes #49073.

Note: See TracTickets for help on using tickets.