Commit ac3f21966f

ac3f21966fe381a2c642d050b0c9072a6230f09f

parent: a977490925

Unsigned

cmc <hello@cleberg.net> · 2026-08-28 19:38 UTC

org readme: let the navigation delegate match, so links leave the web view

The decision handler is @MainActor in the SDK. Without it the method only
nearly matched the optional requirement, so WKNavigationDelegate never
called it and the .linkActivated branch never ran: tapping a link
navigated the embedded web view instead of opening the browser, inside a
frame sized to the README with scrolling off and no way back.

Layout: unified · split

gitbay/Views/Repos/OrgReadmeWebView.swift +1 −1
@@ -226,7 +226,7 @@ private struct OrgWebRepresentable: UIViewRepresentable {
226 func webView( 226 func webView(
227 _ webView: WKWebView, 227 _ webView: WKWebView,
228 decidePolicyFor action: WKNavigationAction, 228 decidePolicyFor action: WKNavigationAction,
229 decisionHandler: @escaping (WKNavigationActionPolicy) -> Void 229 decisionHandler: @escaping @MainActor (WKNavigationActionPolicy) -> Void
230 ) { 230 ) {
231 if action.navigationType == .linkActivated, let url = action.request.url { 231 if action.navigationType == .linkActivated, let url = action.request.url {
232 parent.openURL(url) 232 parent.openURL(url)