@@ -11,7 +11,7 @@ import Mobileserver
1111
1212// We setup a custom scheme qrc:/... to load web resources from our local bundle.
1313// This serves two purposes:
14- // - the React router is the BrowserRouter, so if we loaded index.html as a file, routing
14+ // - the React router is the BrowserRouter, so if we loaded index.html as a file, routing
1515// to e.g. /accounts-summary would try to load this file as an absolute path.
1616// Using the custom scheme, the base will always be qrc:/, so it would route to qrc:/accounts-summary,
1717// which works with the BrowserRouter. If we used the HashRouter, it would work with a custom scheme or by
@@ -122,12 +122,16 @@ struct WebView: UIViewRepresentable {
122122 let customSchemeHandler = CustomSchemeHandler ( )
123123 config. setURLSchemeHandler ( customSchemeHandler, forURLScheme: scheme)
124124
125- // Allows third-party cookies. Needed for onramp iframe'd widgets like MoonPay.
125+ // Allows third-party cookies. Needed for onramp iframe'd widgets like MoonPay.
126126 config. websiteDataStore = WKWebsiteDataStore . default ( )
127127
128128 // TODO: check if official - needed to allow loading the bundle with <script type="module" src="...">
129129 config. preferences. setValue ( true , forKey: " allowFileAccessFromFileURLs " )
130130
131+ // Allow widgets like Pocket to call window.open(). Pocket uses it to launch user
132+ // verification in the browser, for example.
133+ config. preferences. javaScriptCanOpenWindowsAutomatically = true
134+
131135 // The QR code scanner uses a <video> element with an playsInline attribute.
132136 // This setting allows this attribute. Otherwise the QR code scanner would
133137 // go full screen and contain player controls (pause button),
0 commit comments