Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maui Blazor - MacOs - Interacting with input date tag crashes the app. #22181

Closed
00000vish opened this issue May 3, 2024 · 4 comments
Closed
Assignees
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView external platform/macOS 🍏 macOS / Mac Catalyst t/bug Something isn't working

Comments

@00000vish
Copy link

00000vish commented May 3, 2024

Description

Maui Blazor MacOs app is crashing when trying to select a date with the <input typ="date"> tag.

Steps to Reproduce

  1. Clone repo
  2. dotnet build -t:Run -f:net8.0-maccatalyst
  3. Try to select date

Sometimes the date selector will open up, but interacting with it or spamming few click on it will crash the app.

Link to public reproduction project repository

https://github.com/00000vish/maui-bug-report/

Version with bug

8.0.7 SR2

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

Sonoma 14.1.1

Did you find any workaround?

No workarounds

Relevant log output

Could not generate a log file.
@00000vish 00000vish added the t/bug Something isn't working label May 3, 2024
Copy link
Contributor

github-actions bot commented May 3, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jsuarezruiz jsuarezruiz added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label May 3, 2024
@samhouts samhouts added the platform/macOS 🍏 macOS / Mac Catalyst label May 3, 2024
@Eilon
Copy link
Member

Eilon commented May 3, 2024

Hi @00000vish , I tried this with a plain WebView and it repros as well. So I think this is a bug in the native macOS WebView. That means that this bug should be reported directly to Apple via the Feedback Assistant app because it is outside of the control of .NET MAUI.

As a workaround you could consider using a different type of input control, or use a custom date picker control.

For reference, I tried this in a default .NET MAUI app:

  1. Create a regular .NET MAUI app
  2. Change MainPage.xaml to have only this content: <WebView x:Name="wv" />
  3. Change MainPage.xaml.cs to have this code after InitializeComponent():
    	wv.Source = new HtmlWebViewSource(){
         	Html = @"<HTML><BODY><H1>.NET MAUI</H1><P>Welcome to WebView <input type=""date"" value=""2024-05-02"" min=""2018-01-01"" max=""2028-01-01"" />.</P></BODY></HTML>"
    	};

Run the app and try to use the date input, and it will crash.

@Eilon Eilon closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
@Eilon Eilon added the external label May 3, 2024
@00000vish
Copy link
Author

Hey @Eilon, thanks for looking into this! I will go ahead and report it to Apple then.

@Rory-Reid
Copy link

Rory-Reid commented May 14, 2024

Is this a regression from previous behavior?

I can vouch for this as a "Yes", I've been using date type input controls on mac for over a year. Just picked my project back up after a hiatus having updated dotnet, maui, xcode and my OS and it no longer works due to this, I cannot work on my project atm. Not done much digging myself but this issue was the first hit on google for "maui blazor crashes when clicking date picker".

Appreciate the root cause might be in a dependency but that's still a problem for MAUI isn't it?

Edit: ah, wait, is this the culprit? #21057 Just discovered that's my version.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView external platform/macOS 🍏 macOS / Mac Catalyst t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants