Skip to content

Commit

Permalink
fix screen flash on prompt close
Browse files Browse the repository at this point in the history
focus parentWindow on prompt close
(if available)
  • Loading branch information
Araxeus committed Apr 21, 2022
1 parent 2bab8be commit 813e32a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 813e32a

Please sign in to comment.