We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If i subscribe the CoreWebView2 NewWindowRequest event and set e.Handled to true, it opens in a new window instead of doing nothing.
Blocking. My app's basic functions are not working due to this issue.
Stable release (WebView2 Runtime)
122.0.2365.92
1.0.2151.40
WPF
Windows 11
22621.3296
Add Microsoft.AspNetCore.Components.WebView.Wpf NuGet to a WPF project
Add BlazorWebView in the MainWindow and subscribe the BlazorWebViewInitializing event
<blazor:BlazorWebView x:Name="blazorWebView" HostPage="wwwroot\Index.html" Services="{DynamicResource services}" BlazorWebViewInitializing="OnInitWebView"> <blazor:BlazorWebView.RootComponents> <blazor:RootComponent Selector="#app" ComponentType="{x:Type local:Main}" /> </blazor:BlazorWebView.RootComponents> </blazor:BlazorWebView>
private void OnInitWebView(object sender, BlazorWebViewInitializingEventArgs e) { blazorWebView.WebView.CoreWebView2InitializationCompleted += CoreWebView2InitializationCompleted; }
private void CoreWebView2InitializationCompleted(object? sender, CoreWebView2InitializationCompletedEventArgs e) { blazorWebView.WebView.CoreWebView2.NewWindowRequested += (sender, e) => { e.Handled = true; }; }
It opens the text file in editor instead of doing nothing.
No, issue does not reproduce in the corresponding Edge version
Don't know
No response
The text was updated successfully, but these errors were encountered:
I could not repro this issue in 122.0.2365.92 on my end. @neo42deg would you mind to upload your sample app?
Sorry, something went wrong.
@JosephJin0815 I can repro the issue with the attached sample app in runtime version 122.0.2365.92 and 124.0.2478.80.
Wpf_Blazor_Test.zip
JosephJin0815
No branches or pull requests
What happened?
If i subscribe the CoreWebView2 NewWindowRequest event and set e.Handled to true, it opens in a new window instead of doing nothing.
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
122.0.2365.92
SDK Version
1.0.2151.40
Framework
WPF
Operating System
Windows 11
OS Version
22621.3296
Repro steps
Add Microsoft.AspNetCore.Components.WebView.Wpf NuGet to a WPF project
Add BlazorWebView in the MainWindow and subscribe the BlazorWebViewInitializing event
It opens the text file in editor instead of doing nothing.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Don't know
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: