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
fix: respect the user's active app focus #16400
fix: respect the user's active app focus #16400
Conversation
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of these (the bundle mover) we definitely can't change.
The other two we probably can but I'd have to check the history of those impls. Tentative approval pending a check of the superview logic.
@@ -48,7 +48,7 @@ | |||
// Activate app -- work-around for focus issues related to "scary file from | |||
// internet" OS dialog. | |||
if (![NSApp isActive]) { | |||
[NSApp activateIgnoringOtherApps:true]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break the bundle mover, can we not make this change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted the change.
@shazron can you please rebase this PR? |
@codebytere Rebased. |
Release Notes Persisted
|
Congrats on merging your first pull request! 🎉🎉🎉 |
Apple recommends not setting this to true, and this behaviour is non-standard (not to mention annoying when someone is actively focused on another app, like writing) https://developer.apple.com/documentation/appkit/nsapplication/1428468-activateignoringotherapps?language=objc
cc @zcbenz
Description of Change
Checklist
npm test
passes(https://github.com/electron/electron/blob/master/docs/development/testing.md)
Release Notes
Notes: Focus methods no longer steal focus when users are active on other apps