mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
fixes to iframe height
This commit is contained in:
@@ -690,7 +690,7 @@ const MailDisplay = ({ emailData, isMuted, index, totalEmails, demo }: Props) =>
|
||||
</div>
|
||||
)}
|
||||
{emailData?.attachments && emailData?.attachments.length > 0 ? (
|
||||
<div className="mb-4 flex items-center gap-2 px-4 pt-4">
|
||||
<div className="mb-4 flex items-center gap-2 pt-4">
|
||||
{emailData?.attachments.map((attachment, index) => (
|
||||
<div key={index}>
|
||||
<button
|
||||
@@ -732,7 +732,7 @@ const MailDisplay = ({ emailData, isMuted, index, totalEmails, demo }: Props) =>
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
<div className="mb-4 mt-3 flex gap-2 px-4">
|
||||
<div className="mb-4 mt-3 flex gap-2">
|
||||
<button
|
||||
onClick={() => {
|
||||
setMode('reply');
|
||||
|
||||
@@ -18,7 +18,7 @@ export function MailIframe({ html, senderEmail }: { html: string; senderEmail: s
|
||||
isTrustedSender || settings?.externalImages || false,
|
||||
);
|
||||
const iframeRef = useRef<HTMLIFrameElement>(null);
|
||||
const [height, setHeight] = useState(300);
|
||||
const [height, setHeight] = useState(0);
|
||||
const { resolvedTheme } = useTheme();
|
||||
|
||||
const onTrustSender = useCallback(
|
||||
|
||||
@@ -39,6 +39,9 @@ export const template = (html: string, imagesEnabled: boolean = false) => {
|
||||
template.head.appendChild(script);
|
||||
|
||||
template.body.innerHTML = doc.body.innerHTML;
|
||||
template.body.style.height = 'min-content';
|
||||
template.body.style.margin = '0';
|
||||
template.getElementsByTagName('html')[0]?.setAttribute('style', 'height: min-content;');
|
||||
template.body.style.backgroundColor = getComputedStyle(document.body).getPropertyValue(
|
||||
'background-color',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user