diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 5f8b999c2..28be350da 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -1100,7 +1100,8 @@ const PopupMenuBase = new Lang.Class({ let columnWidths = []; let items = this.box.get_children(); for (let i = 0; i < items.length; i++) { - if (!items[i].visible) + if (!items[i].visible && + !(items[i]._delegate instanceof PopupSubMenu && items[i-1].visible)) continue; if (items[i]._delegate instanceof PopupBaseMenuItem || items[i]._delegate instanceof PopupMenuBase) { let itemColumnWidths = items[i]._delegate.getColumnWidths();