fix: ensure menu-did-close is emitted for application menus#49075
Merged
Conversation
menu-did-close is emitted for application menus
ckerr
reviewed
Nov 25, 2025
0864337 to
c03501b
Compare
ckerr
reviewed
Nov 25, 2025
c03501b to
3a61a11
Compare
ckerr
approved these changes
Nov 25, 2025
Member
FTBFS |
3a61a11 to
6ee8aea
Compare
|
Release Notes Persisted
|
This was referenced Nov 26, 2025
Contributor
|
I have automatically backported this PR to "40-x-y", please check out #49092 |
Contributor
|
I have automatically backported this PR to "39-x-y", please check out #49093 |
Contributor
|
I have automatically backported this PR to "38-x-y", please check out #49094 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Follow up to #49017
Correct logic for event emission: we should emit "menu-did-close" both if it's a popup and the top level menu is closed, or if it's an application menu, and the current menu's supermenu
is the top-level menu.
Checklist
npm testpasses(https://github.com/electron/electron/blob/main/docs/development/style-guide.md)Release Notes
Notes: Fixed an issue where
menu-did-closewas not emitted properly for some application menus.