I am using Webview2 in WinUI3. I found that when I clicked the icon of “Google Apps” in google search engine, the flyout (which is a iframe) will appear as usual like This . The red border in this picture was created with JavaScript:
var ifr = document.getElementsByTagName("iframe");
for (let f of ifr){
f.style.border = "Red 3px solid";
}
The color of the button inside will change when the mouse hovers. But when I clicked the button (for example YouTube), the flyout disappeared just like I clicked elsewhere. Same goes to account button’s flyout. And it is also a iframe.
I didn’t modify anything including Webview2 events and properties
I have tested the same problem on WinForms app. This problem doesn’t happen in WinForms app, only in WinUI3. I guess the focus of pointer when the flyout appeared is still on the website instead of flyout even though Webview2 displays flyout on the top. Strangely the default Webview2 window created automatically by “New Window Request” won’t have this problem.