From a2b499c4609494e24f8726eda5536fd13a0a8cdb Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 15 Jul 2013 19:38:05 -0400 Subject: [PATCH] popupMenu: Fix closing submenus when clicking on the expander We need to make sure that we reset the opened submenu when we close the submenu, not trick the toplevel into thinking a closed submenu is the currently opened menu. https://bugzilla.gnome.org/show_bug.cgi?id=704336 --- js/ui/popupMenu.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index b8503bf76..7aaecf52d 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -1369,12 +1369,13 @@ const PopupSubMenuMenuItem = new Lang.Class({ }, _subMenuOpenStateChanged: function(menu, open) { - if (open) + if (open) { this.actor.add_style_pseudo_class('open'); - else + this._getTopMenu()._setOpenedSubMenu(this.menu); + } else { this.actor.remove_style_pseudo_class('open'); - - this._getTopMenu()._setOpenedSubMenu(this.menu); + this._getTopMenu()._setOpenedSubMenu(null); + } }, destroy: function() {