Skip to content

Commit

Permalink
Min diff
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed May 26, 2023
1 parent 3fc5085 commit 0824f10
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/block-editor/src/components/iframe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@ function Iframe( {
const [ before, writingFlowRef, after ] = useWritingFlow();
const [ contentResizeListener, { height: contentHeight } ] =
useResizeObserver();
const disabledRef = useDisabled( { isDisabled: ! readonly } );
const bodyRef = useMergeRefs( [
contentRef,
clearerRef,
writingFlowRef,
disabledRef,
] );
const setRef = useRefEffect( ( node ) => {
let iFrameDocument;
// Prevent the default browser action for files dropped outside of dropzones.
Expand Down Expand Up @@ -181,6 +174,14 @@ function Iframe( {
};
}, [] );

const disabledRef = useDisabled( { isDisabled: ! readonly } );
const bodyRef = useMergeRefs( [
contentRef,
clearerRef,
writingFlowRef,
disabledRef,
] );

const html =
'<!doctype html>' +
'<style>html{height:auto!important;}body{margin:0}</style>' +
Expand Down

0 comments on commit 0824f10

Please sign in to comment.