diff --git a/lib/index.js b/lib/index.js index a6d7cb3..83f03e4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -95,6 +95,8 @@ function electronPrompt(options, parentWindow) { ipcMain.removeListener("prompt-post-data:" + id, postDataListener); ipcMain.removeListener("prompt-error:" + id, errorListener); + parentWindow?.focus(); + if (promptWindow) { promptWindow.destroy(); promptWindow = null;