WebView nested in StackLayout not displaying correctly in iOS/Mac Catalyst
See original GitHub issueDescription
WebView is not displaying on iOS device, it works fine on android and windows devices. I have added steps to reproduce
Steps to Reproduce
Create a page with this code
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MltDimParisPhoneApp.EnglishPage"
NavigationPage.HasNavigationBar="False" NavigationPage.HasBackButton="False"
Shell.NavBarIsVisible="False">
<StackLayout VerticalOptions="StartAndExpand" BackgroundColor="DarkSlateGrey">
<StackLayout Spacing="5" Orientation="Horizontal" Padding="8">
<Button Text="Go Back" Clicked="PreviousLabelGR_Clicked" TextColor="DarkSlateGray"/>
<Button Text="Select Language" Clicked="ChangeLangBtn_Clicked" x:Name="ChangeLangBtn" TextColor="DarkSlateGray"/>
</StackLayout>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100*"/>
</Grid.ColumnDefinitions>
<WebView Grid.Row="0" Grid.Column="0"
Source="https://example.com"
VerticalOptions="StartAndExpand"
HorizontalOptions="Fill"
x:Name="WebView"/>
</Grid>
</StackLayout>
</ContentPage>
Link to public reproduction project repository
none
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16
Did you find any workaround?
No response
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Xamarin Forms - Webview is not showing up within my ...
Change the Vertical Options of the StackLayout (which holds the WebView) from CenterAndExpand to FillAndExpand and the WebView itself.
Read more >[Code]-webview inside listview on xamarin.forms
It's generally just a bad idea to even try to nest a web view inside a list view. Even a nested scroll views...
Read more >David Ortinau, Author at .NET Blog
UI controls like Border, WebView, and Entry received updates to their behavior, ... NET 8 release for the new versions of iOS, iPadOS,...
Read more >What's New in .NET MAUI? (Features & Performance)
NET MAUI's newest features promise to make cross-platform app development even more accessible and efficient. Check them out now.
Read more >Dotnet Maui Net Maui 7.0 | PDF | Hyper V | Xamarin
NET MAUI use Mac Catalyst, a solution from Apple that ... MAUI) app on Mac Catalyst using . ... Conversely, when a WebView...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It’s most likely still a MAUI bug regarding how the WebView is laid out, most likely with StackLayout.
If you replace the outer StackLayout with a Grid, it should work
We’ve moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.