diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index b6a9909256bc76..7ea01231108e1f 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -21,7 +21,6 @@ import { useSelect } from '@wordpress/data'; /** * Internal dependencies */ -import { useBlockSelectionClearer } from '../block-selection-clearer'; import { useWritingFlow } from '../writing-flow'; import { getCompatibilityStyles } from './get-compatibility-styles'; import { useScaleCanvas } from './use-scale-canvas'; @@ -119,7 +118,6 @@ function Iframe( { /** @type {[Document, import('react').Dispatch]} */ const [ iframeDocument, setIframeDocument ] = useState(); const [ bodyClasses, setBodyClasses ] = useState( [] ); - const clearerRef = useBlockSelectionClearer(); const [ before, writingFlowRef, after ] = useWritingFlow(); const setRef = useRefEffect( ( node ) => { @@ -176,8 +174,6 @@ function Iframe( { documentElement.classList.add( 'block-editor-iframe__html' ); - clearerRef( documentElement ); - contentDocument.dir = ownerDocument.dir; for ( const compatStyle of getCompatibilityStyles() ) { @@ -243,7 +239,6 @@ function Iframe( { const bodyRef = useMergeRefs( [ useBubbleEvents( iframeDocument ), contentRef, - clearerRef, writingFlowRef, disabledRef, ] );