Skip to content

Commit 770e1b1

Browse files
lkostrowskiclaudeCopilot
authored
Enable pop-ups in app iframes (#6002)
* Enable pop-ups in app iframes Added 'allow-popups' to iframe sandbox permissions, enabling apps to use native links with target="_blank" instead of relying solely on AppBridge actions. Links should still use rel="noreferrer" for security. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Clarify App iframe pop-up functionality Updated the documentation to clarify that App iframes now allow pop-ups, enabling native links to open in new tabs. --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 199c204 commit 770e1b1

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/all-nights-peel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
App <iframe>s now enable pop-ups (`"allow-popups"`) which means App can use native links to open new tab, instead using AppBridge action. In the nutshell `<a target="_blank"` is now working. It's still recommended to use `rel="noreferrer"` due to security reasons.

src/extensions/views/ViewManifestExtension/components/AppFrame/AppIFrame.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const _AppIFrame = forwardRef<HTMLIFrameElement, AppIFrameProps>(
4141
onLoad={onLoad}
4242
onError={onError}
4343
className={className}
44-
sandbox="allow-same-origin allow-forms allow-scripts allow-downloads"
44+
sandbox="allow-same-origin allow-forms allow-scripts allow-downloads allow-popups"
4545
/>
4646
);
4747
},

0 commit comments

Comments
 (0)