MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
452 stars 55 forks source link

application "hang" / mousover not working (DS_CONTROL ?) #3433

Open OlivierReubens opened 1 year ago

OlivierReubens commented 1 year ago

WebView 1.0.1661.34 VS2022 C++, Win32, MFC based Running on Win10 professional

In our application we use dialogs with embedded subdialogs (using DS_CONTROL windows style) extensively WebView2 controls that are BEFORE the subdialog in the taborder work without issue.

If however I place a webview2 control on the subdialog (it is a child of the subdialog):

I'm getting mixed results for cases where there are webview2 controls that are AFTER the subdialog in the taborder. This gets the same "hang" result in some cases, but works in others.

I couldn't find related posts... Anyone have experience with using dialogs with embedded child dialogs? Any clue as to what could be causing this and how to resolve?

I can provide a working executable (exe and dlls) showing this. (i.e. my learning/test app where I'm putting IWebBrowser2 beside WebView2) I can't easily provide source code, this uses a LOT of proprietary framework.

AB#39447644

OlivierReubens commented 1 year ago

ok, it doesn't appear to the the embedded child dialog. but if you put a webview2 inside a groupbox... this prevents the webview2 from working ?

champnic commented 1 year ago

Hey @OlivierReubens - Thanks for the bug report, and sorry you are running into this. This looks very similar to an internal bug we had on our backlog, so I've linked this issue up to that bug as extra info.

OlivierReubens commented 1 year ago

for completeness sake: in the normal case where in the resource template the groupbox is before the (LTEXT) control which serves as placeholder for the webview2 creation, the webview2 doesn't react to mouse over and "hangs" the application when you click on the webview2. If you swap the groupbox and LTEXT in the resource template, then things work. In both cases the webview2 placeholder control is entirely inside client area of the groupbox.

This obviously means "well just swap them around" is a cop-out, but this has issues of it's own.

Take-A-Byte commented 1 year ago

@OlivierReubens Do you use custom cursor value in CSS that is loaded in WebView2? If yes, it is the reason why webView2 hangs. They are not yet supported by WebView2 and will not be rendered. I experienced a similar hang and the custom cursor was the reason.

Try to replace the custom cursor with pre-defined one. Note: Even the none value for the cursor will not work.

cc: @champnic @david-risney should I create a new bug ticket for UI hanging because of an unsupported cursor?

Also, could we at least add a log in the application console or web console that the cursor user is using is not supported? I think it will make it easier to find a fix for the related bugs


Update I have added a new ticket for the UI hang - https://github.com/MicrosoftEdge/WebView2Feedback/issues/3509

OlivierReubens commented 1 year ago

No.

The issue is entirely related to a groupbox control being 'around' the webview2 host control. and being earlier in the tab order. No groupbox and it works, groupbox taborder after the webview2 and it works. But unfortunately I can't do that because of how the UI library is currently set up to work.