Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Update text-widgets.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KTS915 authored Nov 1, 2023
1 parent 3aa5d3b commit a2eaaef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wp-admin/js/widgets/text-widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ wp.textWidgets = ( function( $ ) {
// Sync input fields to hidden sync fields which actually get sent to the server.
_.each( control.fields, function( fieldInput, fieldName ) {
fieldInput.on( 'input change', function updateSyncField() {
var syncInput = control.syncContainer.find( '.sync-input.' + fieldName );
var syncInput = $(control.syncContainer).find( '.sync-input.' + fieldName );
if ( syncInput.val() !== fieldInput.val() ) {
syncInput.val( fieldInput.val() );
syncInput.trigger( 'change' );
}
});

// Note that syncInput cannot be re-used because it will be destroyed with each widget-updated event.
fieldInput.val( control.syncContainer.querySelector( '.sync-input.' + fieldName ).value );
fieldInput.val( $(control.syncContainer).find( '.sync-input.' + fieldName ).val() );
});
},

Expand Down

0 comments on commit a2eaaef

Please sign in to comment.