mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-14 13:58:31 +00:00
patched to fix the window reloading on windows
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user