authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-28 16:20:57-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-28 16:24:03-08:00
log7a39ce34fa78d9395cc8dee177ad490d5b91daa0
tree6648b26b18fc2eda705abc1c5bd90d3e8ad71772
parent483702df77c6231f4f0755b23a316c12630bb36a

Avoid popup-open false errors on mobile browsers

- Stop throwing when `window.open` returns `null` in `wsNativeApi` - Keep opening external links in a new tab and rely on browser popup policy

1 files changed, 3 insertions(+), 4 deletions(-)

apps/web/src/wsNativeApi.ts+3-4
......@@ -153,10 +153,9 @@ export function createWsNativeApi(): NativeApi {
153153 return;
154154 }
155155
156 const popup = window.open(url, "_blank", "noopener,noreferrer");
157 if (!popup) {
158 throw new Error("Unable to open link. Allow popups and try again.");
159 }
156 // Some mobile browsers can return null here even when the tab opens.
157 // Avoid false negatives and let the browser handle popup policy.
158 window.open(url, "_blank", "noopener,noreferrer");
160159 },
161160 },
162161 git: {