Open mattleibow opened 2 years ago
@mattleibow I'm not aware that we have any specific code for dealing with alerts and things like that in Blazor. (Other than maybe a setting to enable them).
If this setting is off by default and we enabled it in the webview configuration, it is likely an artifact of wanting to do something with the samples in the repo.
That said, unfortunately alert and other types of dialogs are not something we can neglect as they are (sadly) part of the feature set of the platform and some third-party libraries might be depending on it.
We should figure out what we need to do to make sure that if they are enabled, they look correct across the supported platforms.
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.
Let's use this issue to implement WebView IsJavaScriptAlertEnabled and ExecutionMode Platform Specifics on Windows.
Description
This probably should not happen and apps should not do this, but we added a feature in Xamarin.Forms that appears to have value to some people: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/platform/windows/webview-javascript-alert
This current feature only talks about Windows, but I see the Blazor team has done things for iOS. For this reason, we need to clarify what we want to allow and how we want to handle it. If apps are not supposed to use alert/prompt, then why is blazor using specific code - and why not all the platforms? If we want to use this, then we need to make sure it works in all webviews.
Related: windows prompts look bad: https://github.com/dotnet/maui/issues/6961
Public API Changes
None (maybe)
Intended Use-Case
Show a platform UI for web view alerts and prompts.