MicrosoftEdge / MicrosoftEdge/WebView2Feedback
--enable-features=msWebView2BrowserHitTransparent Causes the program to crash in
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
.Net8 WinForm
Using Form.Close() code in WebView2's KeyDown event crashes the program when using --enable-features=msWebView2BrowserHitTransparent.
private void webView21_KeyDown(object sender, KeyEventArgs e)
{
this.Close();
}
private async void Form1_Load(object sender, EventArgs e)
{
var options = new CoreWebView2EnvironmentOptions
{
AdditionalBrowserArguments = "--enable-features=msWebView2BrowserHitTransparent"
};
var env = await CoreWebView2Environment.CreateAsync(null, null, options);
await webView21.EnsureCoreWebView2Async(env);
webView21.Source = new Uri("https://www.google.com");
}
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
124.0.2478.67
SDK Version
1.0.2478.35
Framework
Winforms
Operating System
Windows 10
OS Version
19045.4355
Repro steps
- Create WinForm Application
- Add WebView2 Control
- Add My post code
- Run App
- Press ESC Key
- Application Crash
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
Contributor guide
No contributing guide indexed for this repository
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
Reproduce the crash in a .NET 8 WinForms application using the WebView2 control, runtime 124.0.2478.67, and the provided CoreWebView2EnvironmentOptions setup. Press ESC to trigger Form.Close() from the KeyDown handler, then compare behavior with and without msWebView2BrowserHitTransparent; done means the application no longer crashes under the reported configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100