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

Props TBschen, valentinbora.
Fixes #49073.

Built from https://develop.svn.wordpress.org/trunk@47262


git-svn-id: http://core.svn.wordpress.org/trunk@47062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
antpb 2020-02-11 04:40:10 +00:00
parent 12709269c1
commit 036eca242a
3 changed files with 6 additions and 2 deletions

View File

@ -1113,6 +1113,10 @@
h = $('#image-preview-' + postid).height();
if ( false === this.validateNumeric( el ) ) {
this.iasapi.setOptions({
aspectRatio: null
});
return;
}

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-alpha-47261';
$wp_version = '5.4-alpha-47262';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.