From 15680f7a7ddfd8704692b21fc6493d83c471297b Mon Sep 17 00:00:00 2001 From: Polina Fedorenko Date: Fri, 9 Oct 2026 15:51:55 +0200 Subject: [PATCH] fix(app-bridge-app): send the handshake to window.parent instead of window.top --- .changeset/gentle-frames-answer.md | 7 +++++++ packages/app-bridge-app/src/utilities/notify.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/gentle-frames-answer.md diff --git a/.changeset/gentle-frames-answer.md b/.changeset/gentle-frames-answer.md new file mode 100644 index 000000000..4c31b1dc4 --- /dev/null +++ b/.changeset/gentle-frames-answer.md @@ -0,0 +1,7 @@ +--- +"@frontify/app-bridge-app": patch +--- + +fix: send the connection handshake to the embedding window instead of the top window + +Apps now connect when the platform hosting them is itself embedded in an iframe, such as the asset chooser inside another page. The handshake also no longer reaches the top-level page. diff --git a/packages/app-bridge-app/src/utilities/notify.ts b/packages/app-bridge-app/src/utilities/notify.ts index 796ce170f..d9ec0fed9 100644 --- a/packages/app-bridge-app/src/utilities/notify.ts +++ b/packages/app-bridge-app/src/utilities/notify.ts @@ -3,7 +3,7 @@ import { type NotifyData, type NotifyOptions } from '../types/Notify.ts'; export function notify(topic: string, token: string, data?: NotifyData, options?: NotifyOptions): void { - const parentWindow = window.top; + const parentWindow = window.parent; parentWindow?.postMessage( { topic,