-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: CoreWebView2 NewWindowRequest event to open in the same webview is broken #4250
Comments
Not to hijack, also happened on wpf as well: #4224 |
@Danielx64 Saw your post , As this is a blocker for us , did you get any solution to fix this? |
I ended up downloading a preview runtime and providing that with my app. Not ideal but it fix it for the time being |
@monica-ch Any info on when the fix would be available in windows? |
Hi, thanks for reporting this, we have identified the issue and will deploy the fix soon. |
@yildirimcagri-msft will this also be fixed on the wpf version as well? I also reported this and my report received no new updates. |
@Danielx64 Yes this is going to be webview2 runtime change and fixes the issue in all frameworks. I'll link the issue to this thread and close the other issue. |
@Danielx64, please see comment on the other issue for clarification, I've re-activated it. |
@yildirimcagri-msft When is the fix expected to be deployed through Windows patches? |
The fix is checked-in, please validate via Edge Canary runtime. We are looking to cherry-pick it to Edge 120, but cannot guarantee that approval can go through. Otherwise, the fix should be available in Edge 121 (currently Beta). |
For me it looks like 120 got the update with the fix |
@Danielx64 you mean 120.0.2210.133? |
Yes, the fix is in 120.0.2210.133+. |
Correct @DotNet-Fan , I was on phone when I reported back. |
@Danielx64 @monica-ch I have observed an issue where in the webview2 instance you subscribe to NewWindowRequested event and WindowCloseRequested , then on firsttime these handlers would be hit during open and close popup/window after setting the below code.
But in the same webview2 instance if the popup/window is opened again and closed , newwindowrequested/WindowCloseRequested events are not fired second time. Any Idea? |
@DotNet-Fan Have you seen this issue in previous runtimes? |
@monica-ch I have checked now and it can be seen in previous runtimes as well. |
Resolved in runtimes version 120.0.2210.133+. |
What happened?
If you subscribe to the CoreWebView2 NewWindowRequest and in the handler if you set the e.hendled=true and set the e.NewWindow to the sender that is the current webview2 instance , it opens in a new popup rather than in the same webview2 instance. This was working earlier and the code is broken.
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
120.0.2210.77
SDK Version
Microsoft.UI.Xaml.Controls - v 2.8.6
Framework
WinUI2/UWP
Operating System
Windows 11
OS Version
Windows 11 64 - Microsoft Windows [Version 10.0.22621.2861]
Repro steps
In UWP App , add a webview2 control.
Then make sure that Corewebview2 is initialized using EnsureCoreWebView2Async call.
Once initialized in the CoreWebView2Initialized handler subscribe to CoreWebView2.NewWindowRequested event.
In the CoreWebView2.NewWindowRequested handler add the below code
Navigate to www.pinterest.com and click on login.
Click on Google Login.
It opens a new window outside the main app instead of existing webview2
This was working earlier and the code is broken now.
Repros in Edge Browser
No
Regression
Regression in newer Runtime
Last working version (if regression)
Runtime: 114.0.1823.58
AB#48257884
The text was updated successfully, but these errors were encountered: