From 35d1f4a50eac63e2a7e6a8676337862ea95df825 Mon Sep 17 00:00:00 2001 From: Jonas Meeuws Date: Mon, 16 Feb 2026 21:20:28 +0100 Subject: [PATCH 1/2] style(zapp-iframe): Add editorconfig. * zapp-iframe/.editorconfig: New file. --- zapp-iframe/.editorconfig | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 zapp-iframe/.editorconfig diff --git a/zapp-iframe/.editorconfig b/zapp-iframe/.editorconfig new file mode 100644 index 0000000..5ae900f --- /dev/null +++ b/zapp-iframe/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_style = tab +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true From fa83d88baaf1be45311fc400a54e94a80bb5f82f Mon Sep 17 00:00:00 2001 From: Jonas Meeuws Date: Mon, 16 Feb 2026 21:21:24 +0100 Subject: [PATCH 2/2] fix: Attempt to fix github #1 (new tabs inherit iframe restrictions). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * zapp-iframe/src/lib/components/Dropdown.svelte: Send “open-link” on link button click, preventing the default handler. * example_iframe/zapp-iframe.js: Handle “open-link” messages. --- example_iframe/zapp-iframe.js | 3 +++ zapp-iframe/src/lib/components/Dropdown.svelte | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/example_iframe/zapp-iframe.js b/example_iframe/zapp-iframe.js index c7c5def..8e01825 100644 --- a/example_iframe/zapp-iframe.js +++ b/example_iframe/zapp-iframe.js @@ -91,6 +91,9 @@ window.onmessage = function (e) { opened = msg.state; dropdown.style.visibility = opened ? "visible" : "hidden"; button.contentWindow.postMessage(msg, "*"); + } else if (msg.type === "open-link") { + window.open(msg.url, '_blank').focus(); + button.contentWindow.postMessage(msg, "*"); } else { console.error("no supported msg type: " + msg.type); } diff --git a/zapp-iframe/src/lib/components/Dropdown.svelte b/zapp-iframe/src/lib/components/Dropdown.svelte index 9f5a78f..d566b2c 100644 --- a/zapp-iframe/src/lib/components/Dropdown.svelte +++ b/zapp-iframe/src/lib/components/Dropdown.svelte @@ -82,7 +82,7 @@ '*' ); } - + const cookie = getCookie('zapp-labelson'); if(!cookie) labelson = true; else labelson = cookie === "true"; @@ -173,6 +173,10 @@ class="w95in1 w-25 h-25 style absolute" aria-label={app.img} title={app.tooltip} + onclick={(event) => { + window.parent.postMessage(JSON.stringify({ type: 'open-link', url: app.url }), '*'); + event.preventDefault(); + }} >