Skip to content

Commit

Permalink
fix: don't construct submenu if it's invisible (#16834)
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere authored and MarshallOfSound committed Feb 8, 2019
1 parent 833daaa commit 062778c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion atom/browser/ui/cocoa/atom_menu_controller.mm
Expand Up @@ -220,7 +220,8 @@ - (void)addItemToMenu:(NSMenu*)menu
NSMenu* submenu = [[NSMenu alloc] initWithTitle:label];
[item setSubmenu:submenu];
[NSApp setServicesMenu:submenu];
} else if (type == atom::AtomMenuModel::TYPE_SUBMENU) {
} else if (type == atom::AtomMenuModel::TYPE_SUBMENU &&
model->IsVisibleAt(index)) {
// Recursively build a submenu from the sub-model at this index.
[item setTarget:nil];
[item setAction:nil];
Expand Down

0 comments on commit 062778c

Please sign in to comment.