Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: IPC Dialog showing up behind main window after activated a second time #41803

Closed
3 tasks done
scalgoon opened this issue Apr 9, 2024 · 1 comment
Closed
3 tasks done
Labels

Comments

@scalgoon
Copy link

scalgoon commented Apr 9, 2024

Preflight Checklist

Electron Version

29.1.5

What operating system are you using?

Ubuntu

Operating System Version

Linux dez-ubuntu 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 10:22:43 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

IPC showOpenDialog should open as focused every time without needing the app to be restarted

Actual Behavior

The showOpenDialog only shows as focused whenever it is opened for the first time, any time after that it is opened behind the main window until the app is restarted

Testcase Gist URL

No response

Additional Information

My current code for the dialog:

ipcMain.handle('dialog:openDirectory', async () => {
                const { canceled, filePaths } = await dialog.showOpenDialog(mainWindow, {
                    properties: ['openDirectory']
                })

                if (canceled) {
                    return;
                } else {
                    return filePaths[0]
                }
            })
@codebytere
Copy link
Member

Duplicate #32857

@codebytere codebytere closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants