ReviewOS

craft-native/craft

window.open() and target=_blank are silently dropped — route them to the system browser

#64
Closed glennmichael123 opened this 10 days ago ·
10 days ago

setupUIDelegate (macos.zig:5098-5152) implements only the media-capture permission callback. There is no webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures: anywhere in the repo — and WKWebView's default when the method is absent is to drop the request. So window.open() returns null and target=\"_blank\" links die with no error, no log, nothing.

Any app rendering user or third-party content hits this immediately — in stacksjs/harness it's every link an AI agent emits into a transcript.

Ask: implement createWebViewWithConfiguration: on the existing CraftUIDelegate and route the request's URL to the system browser (NSWorkspace openURL: — same path shell.openExternal already uses), returning nil so no child webview is created. That's the Electron-conventional default and one delegate method. A later option can allow real child windows once multi-window exists.

🤖 Generated with Claude Code

Sign in to comment on this issue.