diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index e14f75d4f..5918c93f6 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -1340,6 +1340,13 @@ const PopupSubMenuMenuItem = new Lang.Class({ this.menu.connect('open-state-changed', Lang.bind(this, this._subMenuOpenStateChanged)); }, + syncSensitive: function() { + let sensitive = this.parent(); + this._triangle.visible = sensitive; + if (!sensitive) + this.menu.close(false); + }, + _subMenuOpenStateChanged: function(menu, open) { if (open) this.actor.add_style_pseudo_class('open');