electron-create-menu icon indicating copy to clipboard operation
electron-create-menu copied to clipboard

In electron 16 this package crashes with defaults on macos

Open s00500 opened this issue 3 years ago • 2 comments

The reason is that the default template adds the "help" menu without any sub entries. Add at least 1 submenu item to make it not crash anymore to the help menu

  {
    role: "help",
    label:"Help",
    showOn: ["darwin"],
    submenu: [
      { label: "Open Some Website",  click(e){
    shell.openExternal("https://example.com", {
      activate: true
    });
} },
    ]
  }

Kind of like this :-)

Leaving this here to help potential other people running into this issue

s00500 avatar Jan 25 '22 14:01 s00500

Hmm, that's interesting! Never encountered this because I replace it. I would expect this to just work, given the search bar that's always present in the help menu, and it sounds like something Electron should support. I'll investigate and make an issue there is applicable. Thanks!

Kilian avatar Jan 25 '22 14:01 Kilian

I used to never define it, and it showed a first item with (null) that stayed disabled, now I upgraded my app from electron 6 something to the very latest version and started building it on my M1 mac, then I encountered the issue :-)

s00500 avatar Jan 25 '22 15:01 s00500