Skip to content

windows opened with windowOpenNoOpenerWithSuccess hang sometimes while debugging in devtools #124231

@akosyakov

Description

@akosyakov

In Chrome sometimes opened window is sharing event loop with the original window, in cases like the same origin or the same parent domain. If one tries to debug one of such windows then others are hanging.

I was wondering whether it is better to rewrite like that:

export function windowOpenNoOpenerWithSuccess(url: string): boolean {
	const newTab = window.open();
	// pop-up allowed
	const success = !!newTab;
	// close immediately to avoid rendering
	newTab?.close();
	if (success) {
		// open safely with own event loop
		windowOpenNoOpener(url);
	}
	return success;
}

Updated: i tried with above and it does not help, Chrome blocks new windows besides first by default.

Metadata

Metadata

Assignees

Labels

insiders-releasedPatch has been released in VS Code InsiderswebIssues related to running VSCode in the web

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions