Merge branch 'master' into update-dom

This commit is contained in:
Alexandru Dima
2021-01-05 09:27:23 +01:00
committed by GitHub
301 changed files with 9199 additions and 4037 deletions

View File

@@ -1195,9 +1195,10 @@ export function computeScreenAwareSize(cssPx: number): number {
* See https://mathiasbynens.github.io/rel-noopener/
*/
export function windowOpenNoOpener(url: string): void {
if (platform.isNative || browser.isEdgeWebView) {
if (browser.isElectron || browser.isEdgeWebView) {
// In VSCode, window.open() always returns null...
// The same is true for a WebView (see https://github.com/microsoft/monaco-editor/issues/628)
// Also call directly window.open in sandboxed Electron (see https://github.com/microsoft/monaco-editor/issues/2220)
window.open(url);
} else {
let newTab = window.open();