0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Fixed Portal preview flashing issue in Offers (#19862)

ref DES-101
This commit is contained in:
Sodbileg Gansukh 2024-03-14 14:29:17 +08:00 committed by GitHub
parent 52a28c0059
commit 2029a5846a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -205,7 +205,7 @@ export const PreviewModalContent: React.FC<PreviewModalProps> = ({
} }
const containerClasses = clsx( const containerClasses = clsx(
'min-w-100 absolute inset-y-0 left-0 right-[400px] flex grow flex-col overflow-y-auto', 'min-w-100 absolute inset-y-0 left-0 right-[400px] flex w-full grow flex-col overflow-y-auto',
previewBgClass previewBgClass
); );
@ -275,7 +275,7 @@ export const PreviewModalContent: React.FC<PreviewModalProps> = ({
hideXOnMobile hideXOnMobile
> >
<div className='flex h-full grow'> <div className='flex h-full grow'>
<div className={`hidden grow flex-col [@media(min-width:801px)]:!visible [@media(min-width:801px)]:!flex ${previewBgColor === 'grey' ? 'bg-grey-50' : 'bg-white'}`}> <div className={`relative hidden grow flex-col [@media(min-width:801px)]:!visible [@media(min-width:801px)]:!flex ${previewBgColor === 'grey' ? 'bg-grey-50' : 'bg-white'}`}>
{preview} {preview}
</div> </div>
{sidebar && {sidebar &&

View file

@ -56,6 +56,9 @@ const PortalFrame: React.FC<PortalFrameProps> = ({href, onDestroyed, selectedTab
if (portalParent === 'preview') { if (portalParent === 'preview') {
loaderClassNames = 'absolute z-50 mt-[-7%] flex h-screen items-center justify-center'; loaderClassNames = 'absolute z-50 mt-[-7%] flex h-screen items-center justify-center';
loaderVisibility = 'invisible'; loaderVisibility = 'invisible';
} else if (portalParent === 'offers') {
loaderClassNames = 'absolute z-50 flex w-full h-full items-center justify-center';
loaderVisibility = 'invisible';
} }
return ( return (