popupMenu.js: submenu inside a submenu won't work
Affected version
Gnome 46 on Arch Linux (up to date) Wayland The issue is inside extensions using popupMenu.js
Bug summary
Using popupMenu.js create a PopupSubMenuMenuItem "inner" inside a PopupSubMenuMenuItem "outer". If you try to open the "inner" PopupSubMenuMenuItem, the "outer" PopupSubMenuMenuItem will close and thus you won't be able to use any menu item inside the "inner" PopupSubMenuMenuItem. Once you again open the "outer" PopupSubMenuMenuItem this will close the "inner" PopupSubMenuMenuItem.
I believe the issue is located in line 902 (_setOpenedSubMenu
) in combination with line 1272 _subMenuOpenStateChanged(menu, open)
: if a submenu opens (e.g. "inner") it goes up to the top hierarchy menu (line 1272: this._getTopMenu()
) and announces itself as "open". The top menu unfortunately will see if there is already an open menu (e.g. "outer") and close it (line 903/904).
Keeping a single submenu open is probably because you only want a single menu in a single hierarchy open. unfortunately you prevent nested submenus. To fix it, you need to implement a more complex logic. It may be easier to just put nested submenu out of scope.