Ticket #43657: 43657.2.diff
File 43657.2.diff, 1.0 KB (added by , 6 years ago) |
---|
-
src/js/_enqueues/wp/widgets/custom-html.js
112 112 * to prevent the editor's contents from getting sanitized as soon as a user removes focus from 113 113 * the editor. This is particularly important for users who cannot unfiltered_html. 114 114 */ 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; 116 116 if ( ! control.contentUpdateBypassed ) { 117 117 syncInput = control.syncContainer.find( '.sync-input.content' ); 118 118 control.fields.content.val( syncInput.val() ).trigger( 'change' );