diff --git a/src/js/_enqueues/wp/customize/controls.js b/src/js/_enqueues/wp/customize/controls.js index 0496435e42..5656b41687 100644 --- a/src/js/_enqueues/wp/customize/controls.js +++ b/src/js/_enqueues/wp/customize/controls.js @@ -8461,6 +8461,13 @@ return; } + // Abort if we're inside of a block editor instance. + if ( event.target.closest( '.block-editor-writing-flow' ) !== null + || event.target.closest( '.block-editor-block-list__block-popover' ) !== null + ) { + return; + } + // Check for expanded expandable controls (e.g. widgets and nav menus items), sections, and panels. api.control.each( function( control ) { if ( control.expanded && control.expanded() && _.isFunction( control.collapse ) ) {