Skip to content Skip to sidebar Skip to footer

Cocoa: Wkwebview / Webview Cannot Open Links Inside Gmail Or Inbox

I am the developer of Boxy, a famous native wrapper around Inbox by Gmail, and wanted to ask if anyone is able to help with something I have been struggling with since day one of d

Solution 1:

I found a solution. This issue is due to when clicking link, instead of opening using target=_blank, Gmail attempts to open an about:blank window and then run javascript to redirect the link. You need to make sure that Gmail can correctly receive the handle of the created window.

- (WKWebView *)webView:(WebUI *)webView
createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration
forNavigationAction:(WKNavigationAction *)navigationAction
windowFeatures:(WKWindowFeatures *)windowFeatures

You need to make sure this delegate method correctly returns the newly created wkwebview.

Post a Comment for "Cocoa: Wkwebview / Webview Cannot Open Links Inside Gmail Or Inbox"