question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Windows] HTML select options are not properly displayed in WebView

See original GitHub issue

Description

HTML select option are not rendered properly in BlazorWebView when targeting and running on windows. You can see it on the following image:

image

I have tested this and it doesn’t happen for Android, IOs and Mac Catalyst.

Reproduction project

OS: Windows IDE: Visual Studio 2022 preview 17.4.0 preview 1.0 SDK: .NET 6.0.400 Template used: dotnet new maui-blazor Target: net6.0-windows10.0.190410

Steps to Reproduce

  • target Windows
  • run the reproduction project
  • try selecting the value from the HTML select

alternatively

  • use .NET MUI Blazor App template
  • add following HTML to the bottom of the page
<select>
  <option value="1">AAAAAAAAAAAAAAAAAA</option>
  <option value="2">BBBBBBBBBBBBBBBBBB</option>
  <option value="3">CCCCCCCCCCCCCCCCCC</option>
</select>
  • target windows
  • run the project
  • try selecting the value from the HTML select

Version with bug

6.0.400

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Microsoft.Windows.SDK.NET 10.0.19041.24

Did you find any workaround?

No response

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
TanayParikhcommented, Aug 24, 2022

Got it, so this is either an issue with MAUI’s WebView, or more likely a bug in the underlying CoreWebView2. Added the webview label for visibility.

1reaction
MichaelMelenacommented, Aug 24, 2022

@MichaelMelena thanks for creating this issue. Can you kindly confirm if you’re able to reproduce this issue on a base WebView (without Blazor)?

Yes I am able to reproduce this issue on base MAUI WebView

image

Here is a repro project

Steps:

  • Target Windows
  • Run the Project
  • Try to select different value in HTML select
Read more comments on GitHub >

github_iconTop Results From Across the Web

Webview not working with HTML select element
So my webview is not working with the select element. In other words when I click the select element on any page it...
Read more >
HTML Dropdown does not show - Support
Hi, I am upgrading ODK Table from version 2.0.6 to 2.1.6. I got the issue where a simple dropdown in html form does...
Read more >
<select>: The HTML Select element - HTML - MDN Web Docs
This Boolean attribute indicates that multiple options can be selected in the list. If it is not specified, then only one option can...
Read more >
Android WebView Example Tutorial
Android WebView is used to display HTML in an android app. We can use android WebView to load HTML page into android app....
Read more >
Build web apps in WebView
The WebView class is an extension of Android's View class that allows you to display web pages as a part of your activity...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found