Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Freezing with msWebView2BrowserHitTransparent

Post Reply
Craiovan
Posts: 2
Joined: Sat Jul 30, 2022 7:32 pm

Freezing with msWebView2BrowserHitTransparent

Post 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?
User avatar
salvadordf
Posts: 4563
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Freezing with msWebView2BrowserHitTransparent

Post 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
Craiovan
Posts: 2
Joined: Sat Jul 30, 2022 7:32 pm

Re: Freezing with msWebView2BrowserHitTransparent

Post 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!
Post Reply