AlexTorresDev / custom-electron-titlebar

Custom electon title bar inpire on VS Code title bar
MIT License
866 stars 148 forks source link

Duplicate menu items after updateMenu #186

Closed Christilut closed 2 years ago

Christilut commented 2 years ago

Describe the bug Disabled menu items are getting duplicated after using updateMenu

To Reproduce Steps to reproduce the behavior:

  1. Add a menu bar without disabled items
  2. Create an identical menu with a few disabled top level menu item enabled: false
  3. Run titlebar.updateMenu(menu) with the menu with disabled items
  4. Now run titlebar.updateMenu(menu) again with the original menu, without disabled items
  5. The disabled menu items are still there, and the normal enabled menu is appended at the end

Expected behavior Disabled menu items should be gone after the last updateMenu

Screenshots image

Desktop (please complete the following information):

Araxeus commented 2 years ago

Custom electron titlebar: 3.2.5

uuuuh the latest version is https://github.com/AlexTorresSk/custom-electron-titlebar/releases/tag/v4.1.0 3.2.5 was released 2 years ago? is this a mistake?

Electron: 11

reached end of life 2 years ago too?

are you a time traveler? 😅