Added delay to avoid preview flashing (#19548)
This commit is contained in:
parent
57810cd34e
commit
363fbd1d9b
@ -19,6 +19,7 @@ const PortalFrame: React.FC<PortalFrameProps> = ({href, onDestroyed, selectedTab
|
||||
const makeVisible = useCallback(() => {
|
||||
setTimeout(() => {
|
||||
if (iframeRef.current) {
|
||||
setHasLoaded(true);
|
||||
setIsInvisible(false);
|
||||
}
|
||||
}, 100); // Delay to allow scripts to render
|
||||
@ -64,7 +65,6 @@ const PortalFrame: React.FC<PortalFrameProps> = ({href, onDestroyed, selectedTab
|
||||
title="Portal Preview"
|
||||
width="100%"
|
||||
onLoad={() => {
|
||||
setHasLoaded(true);
|
||||
makeVisible();
|
||||
}}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user