Media: clear inputs after cropping on attachment details screen.

Clear the crop selection input fields after the crop action is complete. 
Fixes unexpected re-cropping behavior if the crop button was clicked more than once.

Props davidbinda.
Fixes #30155.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Adam Silverstein 2020-10-02 15:11:06 +00:00
parent f880f14080
commit f426a1fa04
3 changed files with 6 additions and 2 deletions

View File

@ -1007,6 +1007,10 @@
sel.fh = h;
this.addStep({ 'c': sel }, postid, nonce);
}
// Clear the selection fields after cropping.
$('#imgedit-sel-width-' + postid).val('');
$('#imgedit-sel-height-' + postid).val('');
},
/**

File diff suppressed because one or more lines are too long

View File

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