Skip to content

Commit

Permalink
Merge pull request #161 from humhub/160-ios-external-content-iframes-…
Browse files Browse the repository at this point in the history
…open-automatically

Redirect only if not for the main frame
  • Loading branch information
luke- authored Feb 15, 2024
2 parents fa20fef + b8bcfc5 commit 5b4a894
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pages/web_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class WebViewAppState extends ConsumerState<WebViewApp> {
// 1st check if url is not def. app url and open it in a browser or inApp.
_setAjaxHeadersJQuery(controller);
final url = action.request.url!.origin;
if (!url.startsWith(manifest.baseUrl)) {
if (!url.startsWith(manifest.baseUrl) && action.isForMainFrame) {
authBrowser.launchUrl(action.request);
return NavigationActionPolicy.CANCEL;
}
Expand Down

0 comments on commit 5b4a894

Please sign in to comment.