Skip to content

Commit 4d00d35

Browse files
kmwilkersonclaude
andcommitted
fix(email-preview): use allow-same-origin sandbox so contentDocument is accessible (NPPD-1525)
With sandbox="" the iframe is treated as a unique opaque origin, making contentDocument null. The onLoad handler returned early and never set isReady, leaving the spinner visible indefinitely. allow-same-origin is safe here because allow-scripts is not set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ae4d00e commit 4d00d35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wizards/newspack/views/settings/emails/email-preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const EmailPreview: React.FC< EmailPreviewProps > = ( { postId } ) => {
161161
ref={ iframeRef }
162162
className="newspack-email-preview__iframe"
163163
srcDoc={ html }
164-
sandbox=""
164+
sandbox="allow-same-origin"
165165
tabIndex={ -1 }
166166
title="Email preview"
167167
onLoad={ handleIframeLoad }

0 commit comments

Comments
 (0)