-
Notifications
You must be signed in to change notification settings - Fork 51
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
Trying to modify/print a pop-up window with programmatically created content doesn't work if an event handler is attached to NewWindowRequested #409
Comments
I've filed an internal bug to investigate. Third time's the charm! We'll verify your full scenario this time. |
Note sure of your use, so I'm not sure if it will meet your needs or not, but I created a small demo project that may work for you. WebView2TestNewWindowRequested.zip To use the demo:
*Note: In the demo project, there's no need to enter anything in the URL address bar--the HTML is automatically loaded from the "index.html" file. It's there in case one wants to navigate to a URL, instead of using the HTML that's loaded by default. Here's an overview: index.html
WebView2 control name: webView21
|
When I opened a child window using NewWindowRequested and Marking the event handled as true. child window got opened, then when I click the cancel button in the child window the child window is not closing. and when I inspect the child window javascript it display error as “javascript must not be allowed to close a window that was not opened by that same javascript". it seems in child window unable to get the parent reference . can anyone help me to solve the issue. Note: I tried in latest version of Webview2 (wpf and winform) |
This is fixed in 1.0.781-prerelease SDK package. Thanks! |
This is another follow-up to issues #134 and #293. The crash is gone now, but the original use case doesn't work.
Following code works as intended if you let WebView2 handle the created pop-up window. If you attach an event handler to NewWindowRequested to create the pop-up window yourself, it doesn't show "Hello World" and doesn't get printed.
AB#28898656
The text was updated successfully, but these errors were encountered: