Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Impossible to update the menu #245

@Makio64

Description

@Makio64

Problem Description

On recent electron version, changing the menu using the example or other methods didnt work and the menu in the title bar simply disappear.

Steps to Reproduce

	// in the main
	const menu = new Menu()
	menu.append(
		new MenuItem({
			label: 'File',
			submenu: [
				{
					label: 'Import gltf/glb',
					click: () => {
						console.log('Open File')
					},
				},
				{
					type: 'separator',
				},
				{
					label: 'Close',
					click: () => {
						win.close()
					},
				},
			],
		}),
	)
	Menu.setApplicationMenu(menu)

Expected Behavior

The title bar is updated with the new menu

Current Behavior

the menu disappear

Additional Information

  • windows 11
  • node v20.5.0
  • electron 27.0.2 / also didn't work on ^26.0.0

Note:
Labels - bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions