Prevent rendering safe-app outside its container while loading (#2143)
This commit is contained in:
parent
ee03bb6ea7
commit
fbff0a35e0
|
@ -59,11 +59,12 @@ const StyledCard = styled(Card)`
|
||||||
padding: 0;
|
padding: 0;
|
||||||
`
|
`
|
||||||
|
|
||||||
const StyledIframe = styled.iframe`
|
const StyledIframe = styled.iframe<{ isLoading: boolean }>`
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
display: ${({ isLoading }) => (isLoading ? 'none' : 'block')};
|
||||||
`
|
`
|
||||||
|
|
||||||
const Breadcrumb = styled.div`
|
const Breadcrumb = styled.div`
|
||||||
|
@ -326,6 +327,7 @@ const AppFrame = ({ appUrl }: Props): React.ReactElement => {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<StyledIframe
|
<StyledIframe
|
||||||
|
isLoading={appIsLoading}
|
||||||
frameBorder="0"
|
frameBorder="0"
|
||||||
id={`iframe-${appUrl}`}
|
id={`iframe-${appUrl}`}
|
||||||
ref={iframeRef}
|
ref={iframeRef}
|
||||||
|
|
Loading…
Reference in New Issue