-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Setting window.opener to null only works in browsers #628
Comments
I'm not sure how to detect running in an |
@alexandrudima would it make sense to provide a setting that can turn this behavior off and make the original call to window.open? Here's the line in vs code, but they have a flag |
@hawkerm Is there any way at runtime for us to detect this special case? For example, this is how we detect the
Perhaps there is a way for us to detect running under an |
@alexandrudima how about just looking at the user agent string? It has Mozilla/5.0 (Windows NT 10.0; WOW64; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299 Compared to the browser in Edge: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299 The Windows WebView has an event for opening new windows which requires the developer using the webview to decide what to do with the requested new window. It doesn't pass a reference or have any context from the requesting page, so its not susceptible to the opener issue. |
Awesome, thanks for working towards a solution! |
Extracted from #601 (comment)
From @hawkerm
Regarding #601
I'm running Monaco in a x-ms-webview, so 10.1.0 broke that as I wouldn't get the uri in the new window request anymore (only about:blank).
Saw there were some updates for this code path in the vscode tree to detect if it was a 'native' platform. Not sure if that'll detect the x-ms-webview case as well, but want to make sure this scenario can be covered too.
The text was updated successfully, but these errors were encountered: