From 540b331096c169c3c8cb9bfc054bf917ede2a8be Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Fri, 2 Oct 2020 15:09:46 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@49087 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/lib/image-edit.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/_enqueues/lib/image-edit.js b/src/js/_enqueues/lib/image-edit.js index 8e3a8657da..340966df6d 100644 --- a/src/js/_enqueues/lib/image-edit.js +++ b/src/js/_enqueues/lib/image-edit.js @@ -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(''); }, /**