Make WordPress Core

Ticket #43657: 43657.2.diff

File 43657.2.diff, 1.0 KB (added by desrosj, 6 years ago)
  • src/js/_enqueues/wp/widgets/custom-html.js

     
    112112                         * to prevent the editor's contents from getting sanitized as soon as a user removes focus from
    113113                         * the editor. This is particularly important for users who cannot unfiltered_html.
    114114                         */
    115                         control.contentUpdateBypassed = control.fields.content.is( document.activeElement ) || control.editor && control.editor.codemirror.state.focused || 0 !== control.currentErrorAnnotations;
     115                        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' );
    118118                                control.fields.content.val( syncInput.val() ).trigger( 'change' );