Skip to content

Commit

Permalink
Disabled MenuItem roles on macOS.
Browse files Browse the repository at this point in the history
Closes #969
Upstream-ref: eclipse-theia/theia#11217

Signed-off-by: Akos Kitta <[email protected]>
  • Loading branch information
Akos Kitta committed Jun 3, 2022
1 parent 5b486b1 commit 946ed5a
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from '@theia/core/lib/common/menu';
import {
ElectronMainMenuFactory as TheiaElectronMainMenuFactory,
ElectronMenuItemRole,
ElectronMenuOptions,
} from '@theia/core/lib/electron-browser/menu/electron-main-menu-factory';
import {
Expand Down Expand Up @@ -96,6 +97,15 @@ export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory {
return { label, submenu };
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
protected override roleFor(id: string): ElectronMenuItemRole | undefined {
// MenuItem `roles` are completely broken on macOS:
// - https://github.com/eclipse-theia/theia/issues/11217,
// - https://github.com/arduino/arduino-ide/issues/969
// IDE2 uses commands instead.
return undefined;
}

protected handleElectronDefault(
menuNode: CompositeMenuNode,
args: any[] = [],
Expand Down

0 comments on commit 946ed5a

Please sign in to comment.