Open sudongg opened 2 years ago
waiting...
This looks to be fixed in WASDK 1.3, it does not seem to repro in WinUI3 Gallery. @applefanbois @sudongg please reactivate if you see this with latest bits. Thanks!
I have 1.3.230724000 and the problem is still there.
1-I create a webview2 attached to the main window. 2-Then create a new window 3-Re attach the first webview2 to the new window
The webview display either white page or may display correctly. Clicking on the webview2 in the new window bring back to front the main window. Richt click on the webview2 in the new window brings the context menu in the main window.
If I create the webview2 in the new window and move it to the new window, the situation is reversed.
That problem is NOT fixed.
Simple when you detach a gui object from another one, you need to tell everyone in the webview2 that they have a new parent. Somebody at Microsoft took some shortcuts to connect the the original windows not looking at the parent GUI.
Thanks for clarifying! I think this aspect is what was missed when previously trying to repro this:
Re attach the first webview2 to the new window
Moving a WebView2 to a different window might be hitting a hosting issue where some aspect remains connected to the original HWND it was hosted in.
This exact issue still presents in wasdk 1.5 experimental. And it is critical to our business code.
We simply tell our customers that need to be able to transfer a webpage to another window (mostly to compare forms) to get the macOS version of our App instead.
Describe the bug
WinAppSdk Self-contained project, when WebView2 changes the window, clicking on the new window activates the main window.
Steps to reproduce the bug
3.MainWindow.xaml.cs Add
Expected behavior
Only the window where WebView2 is located will be activated
Screenshots
No response
NuGet package version
1.1.1
Packaging type
Unpackaged
Windows version
Windows 10 version 2004 (19041, May 2020 Update)
IDE
Visual Studio 2022
Additional context
No response