Make WordPress Core

Ticket #46335: 46335.diff

File 46335.diff, 741 bytes (added by audrasjb, 6 years ago)

Remove change event to avoid "dirty" state.

  • src/js/_enqueues/wp/widgets/custom-html.js

    diff --git a/src/js/_enqueues/wp/widgets/custom-html.js b/src/js/_enqueues/wp/widgets/custom-html.js
    index 6cc4835..93aa901 100644
    a b wp.customHtmlWidgets = ( function( $ ) { 
    115115                        control.contentUpdateBypassed = control.fields.content.is( document.activeElement ) || control.editor && control.editor.codemirror.state.focused || 0 !== control.currentErrorAnnotations.length;
    116116                        if ( ! control.contentUpdateBypassed ) {
    117117                                syncInput = control.syncContainer.find( '.sync-input.content' );
    118                                 control.fields.content.val( syncInput.val() ).trigger( 'change' );
     118                                control.fields.content.val( syncInput.val() );
    119119                        }
    120120                },
    121121