AlexTorresDev / custom-electron-titlebar

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

Click eventListener is not working for menu that doesn't have any submenu #252

Open Bradeep opened 9 months ago

Bradeep commented 9 months ago

Problem Description

The onclick listener that has been added to menu directly is not getting called. This used to work in v4.1.2 but when we tried to update it to v4.2.8, it's not working

Sample code

const sampleTemplate = [{
     label:"Resume",
     click: () => {},
 }, 
 {
   label: "Test",
   submenu:[
     label: "Test",
     click: ()=> {}
   ]}
]

Expected Behavior

Current Behavior

Additional Information

Current versions that we are using