From 813e32a8ccb35db1fbcb491622c737d95ce97a4f Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Thu, 21 Apr 2022 15:57:29 +0300 Subject: [PATCH] fix screen flash on prompt close focus parentWindow on prompt close (if available) --- lib/index.js | 2 ++ 1 file changed, 2 insertions(+) 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;