patched to fix the window reloading on windows

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2020-08-14 11:06:14 +02:00
parent 960d8dba2e
commit ee327eff18
2 changed files with 3 additions and 14 deletions

View File

@@ -110,18 +110,4 @@ export class WorkspaceService extends TheiaWorkspaceService {
}
}
protected openWindow(uri: FileStat, options?: WorkspaceInput): void {
const workspacePath = new URI(uri.uri).path.toString();
try {
this.openNewWindow(workspacePath);
if (this.shouldPreserveWindow(options)) {
setTimeout(() => window.close(), 10);
}
} catch (error) {
// Fall back to reloading the current window in case the browser has blocked the new window
(this as any)._workspace = uri;
this.logger.error(error.toString()).then(() => this.reloadWindow());
}
}
}