Widgets: Remove change
event when editing a Custom HTML widget.
The `change` event was previously required to ensure that the Customizer picked detected changes to the widget’s content and synced them to the preview. In the current state, though, the `trigger( ‘change’ )` is no longer required and is causing issues with the widget’s “Done” and “Save” buttons. Fixes #45335. Props audrasjb, afercia, westonruter. git-svn-id: https://develop.svn.wordpress.org/trunk@44816 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8ae4796288
commit
0f618b4f30
@ -115,7 +115,7 @@ wp.customHtmlWidgets = ( function( $ ) {
|
||||
control.contentUpdateBypassed = control.fields.content.is( document.activeElement ) || control.editor && control.editor.codemirror.state.focused || 0 !== control.currentErrorAnnotations.length;
|
||||
if ( ! control.contentUpdateBypassed ) {
|
||||
syncInput = control.syncContainer.find( '.sync-input.content' );
|
||||
control.fields.content.val( syncInput.val() ).trigger( 'change' );
|
||||
control.fields.content.val( syncInput.val() );
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user