-
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
WinForms WebView2 - how to handle Ctrl+Click on a link #371
Comments
Thanks for pointing this out! This is a known issue caused by a change in the web platform behavior. Previously, a new tab would replace the content in the WebView, now it opens a new window. We are exploring creating a NewTabRequested Event or also firing the NewWindowRequested Event |
Thanks for the clarification @pagoe-msft! 👍 Either one of the solution(s) would be fine for me, as long as I can differentiate between new window and new tab requests. Hope this makes it into one of the next releases 🤞 |
On NewWindowRequested, any plans to provide settings from window.open, so we can set size, etc? |
@ukandrewc - I'll add that to our backlog as well! Do you mind creating a separate GH issue? |
Hi Everyone, This was addressed in the 1.0.707-prerelease version. |
I don't see a way to tell the difference to tell if the user did a ctrl+click or not? |
I can register an event handler for the WinForms webView2 UserControl's .CoreWebview2.NewWindowRequested event and that event gets raised whenever I right click > and then select/click > 'Open in new Tab' in the context menu, however NOT when I hold the [Ctrl] key + left click a link. The later opens an entirely new browser window outside my application's context / control.
How can I handle both - new window- AND new tab requests?
Thanks!
-J
AB#28262280
The text was updated successfully, but these errors were encountered: