Skip to content

Commit

Permalink
Fix HybridWebView browser dev tools on iOS/MacCat (#24679)
Browse files Browse the repository at this point in the history
The dev tools settings were being set on a separate webview that wasn't being used. This change applies the settings to the webview actually being used.

Fixes #24497
  • Loading branch information
Eilon authored Sep 10, 2024
1 parent 2e15377 commit cdc0836
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected override WKWebView CreatePlatformView()
// iOS WKWebView doesn't allow handling 'http'/'https' schemes, so we use the fake 'app' scheme
config.SetUrlSchemeHandler(new SchemeHandler(this), urlScheme: "app");

var webview = new WKWebView(RectangleF.Empty, config)
var webview = new MauiHybridWebView(this, RectangleF.Empty, config)
{
BackgroundColor = UIColor.Clear,
AutosizesSubviews = true
Expand All @@ -56,7 +56,7 @@ protected override WKWebView CreatePlatformView()
}
}

return new MauiHybridWebView(this, RectangleF.Empty, config);
return webview;
}

public static void MapEvaluateJavaScriptAsync(IHybridWebViewHandler handler, IHybridWebView hybridWebView, object? arg)
Expand Down

0 comments on commit cdc0836

Please sign in to comment.