Media: Fix focus loss updating custom fields in media modal.

When the save action runs to dynamically save changes to custom fields in the media modal, the custom fields container is re-rendered, losing focus. Remove the re-rendering of custom fields to prevent loss of focus.

Props lucymtc, teebee, syhc, afrin29, antpb, joedolson.
Fixes #40909.
Built from https://develop.svn.wordpress.org/trunk@55299


git-svn-id: http://core.svn.wordpress.org/trunk@54832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson 2023-02-08 19:40:19 +00:00
parent 411cd2f5b3
commit be531bdd37
3 changed files with 2 additions and 5 deletions

View File

@ -2464,9 +2464,6 @@ AttachmentCompat = View.extend(/** @lends wp.media.view.AttachmentCompat.prototy
'change textarea': 'save' 'change textarea': 'save'
}, },
initialize: function() {
this.listenTo( this.model, 'change:compat', this.render );
},
/** /**
* @return {wp.media.view.AttachmentCompat} Returns itself to allow chaining. * @return {wp.media.view.AttachmentCompat} Returns itself to allow chaining.
*/ */

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.2-beta1-55298'; $wp_version = '6.2-beta1-55299';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.