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

On Windows, closing the modal does not send focus back to the previous application #2

Open
alecrios opened this issue Nov 13, 2018 · 0 comments

Comments

@alecrios
Copy link
Owner

The electron method app.hide() hides all application windows and sends focus back to the previously-focused application. However, this is only available for macOS. On Windows, we must use BrowserWindow.hide() which only hides the window in question. Even if we only have a single window open, calling this method on it does not send focus to another application. Focus will be lost and you have to manually alt+tab or click into your desired application.

Only solution in sight is a native Node module that can get the focused window when the modal is being opened, and then refocus it once the modal is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant