macOS: Fix "main window cannot be activated" (fix #1415, PR #1417)

This commit is contained in:
Sirisak Lueangsaksri 2022-07-31 00:31:18 +07:00 committed by GitHub
parent b362fbec3b
commit 57636b9022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -154,10 +154,6 @@ export async function createMainWindow(
await clearCache(mainWindow);
}
if (options.targetUrl) {
await mainWindow.loadURL(options.targetUrl);
}
setupCloseEvent(options, mainWindow);
return mainWindow;

View File

@ -415,6 +415,10 @@ async function onReady(): Promise<void> {
})
.catch((err) => log.error('dialog.showMessageBox ERROR', err));
}
if (appArgs.targetUrl) {
await mainWindow.loadURL(appArgs.targetUrl);
}
}
app.on(