diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index 605ff0c97e109..bbda0f4ba65e7 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -116,17 +116,10 @@ function Iframe( { bubbleEvents( contentDocument ); setIframeDocument( contentDocument ); clearerRef( documentElement ); - bodyRef( contentDocument.body ); contentDocument.body.classList.add( 'wp-block-editor__iframe' ); contentDocument.body.classList.add( 'editor-styles-wrapper' ); - contentDocument.body.addEventListener( 'click', ( event ) => { - if ( event.target === contentDocument.body ) { - node.click(); - } - } ); - // Ideally ALL classes that are added through get_body_class should // be added in the editor too, which we'll somehow have to get from // the server in the future (which will run the PHP filters). @@ -252,12 +245,12 @@ function Iframe( { > { iframeDocument && createPortal( - <> +
{ contentResizeListener } { children } - , +
, iframeDocument.body ) }