codebytere

#49017: fix: only call popup closecallback for top-level menu

Merged
Created: Nov 19, 2025, 2:56:00 AM
Merged: Nov 21, 2025, 9:37:47 AM
5 comments
Target: main

Description of Change

Closes #49005.

Fixes an issue where the close callback param for menu.popup would fire when any arbitrary submenu of the given menu closed, and not the menu itself.

Fix this by ensuring that menuDidClose checks for the menu being the correc top-level menu.

Checklist

Release Notes

Notes: Fixed an issue where the close callback param for menu.popup would fire when any arbitrary submenu of the given menu closed, and not the menu itself.

Backports

38-x-y
In-flight
PR Number
#49047
Waiting to be merged
39-x-y
In-flight
PR Number
#49045
Waiting to be merged
40-x-y
In-flight
PR Number
#49046
Waiting to be merged

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron