Page 1 of 1

Freezing with msWebView2BrowserHitTransparent

Posted: Tue Aug 27, 2024 2:17 am
by Craiovan
Hi, I am running into an issue with WebView4Delphi freezing up in some cases when using a specific feature: msWebView2BrowserHitTransparent. This feature prevents the WebView frame from grabbing all the input and brings it more in line with how old embedded IE used to work, where you could insert it inside a form and capture all the mouse and keyboards events sent to it.

I was able to reproduce the freezing issue with the SimpleBrowser demo using the following steps:

1. Load up SimpleBrowser demo project and at the bottom of uSimpleBrowser.pas before GlobalWebView2Loader.StartWebView2; add this line:

Code: Select all

GlobalWebView2Loader.AdditionalBrowserArguments := '--enable-features=msWebView2BrowserHitTransparent';
2. Run the project and it will load bing.com
3. Click and hold the mouse down on any links on the page (Like the top "Learn more about third party cookies" link), drag it down the page a little then release the mouse button.
4. At this point the browser is frozen. Scrolling with the mouse works, but nothing can be clicked in it.

Any ideas?

Re: Freezing with msWebView2BrowserHitTransparent

Posted: Tue Aug 27, 2024 8:21 am
by salvadordf
Hi,

msWebView2BrowserHitTransparent is a feature created by Microsoft and other developers reported some crashes using it :
https://github.com/MicrosoftEdge/WebView2Feedback/issues/4512

This is probably an upstream issue. Report it in the feedback repository of the WebView2 project :
https://github.com/MicrosoftEdge/WebView2Feedback/issues

Re: Freezing with msWebView2BrowserHitTransparent

Posted: Tue Aug 27, 2024 12:28 pm
by Craiovan
I was able to recrate it in one of the official WebView samples, so I created a new issue in the feedback repo:
https://github.com/MicrosoftEdge/WebView2Feedback/issues/4772

Thanks for the quick reply, and for all your great work!