[Windows] WebView doesn't display url when inside a VerticalStackLayout
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 296
Description
Description
I recently decided to change the StackLayout to VerticalStackLayout.
If I place a WebView control within a VerticalStackLayout. the web page at Source is not displayed. If I replace the VerticalStackLayout with StackLayout, the web page is displayed.
Works fine on Android 12.1 - API 32.
Steps to Reproduce
- Compile and run attached project as a Windows app on Windows 11. The project contains 2 pages. They are identical except one uses StackLayout and the other VerticalStackLayout.
- Select "Display a Web page using StackLayout". This page will work as expected
- Select "Display a Web page using VerticalStackLayout". This page will not work as expected
Link to public reproduction project repository
https://github.com/dotnet/maui/files/9595317/WebViewTest.zip
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.4.0 Preview 2.0 on Windows 11
Did you find any workaround?
Use StackLayout instead of VerticalStackLayout
Relevant log output
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached WebViewTest.zip and run its two pages as a Windows app on Windows 11, comparing the StackLayout and VerticalStackLayout cases. Trace the Windows WebView and layout behavior, then verify that the page from Source displays inside VerticalStackLayout without regressing the working StackLayout case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100