From 1ae1207ab830761438c8ae43f8cf8739d9a87cfd Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Wed, 18 Jan 2023 19:15:52 +1300 Subject: [PATCH] Fix nested context menu popup (#13578) Fixes https://github.com/space-wizards/space-station-14/issues/13565 --- Content.Client/ContextMenu/UI/EntityMenuUIController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Content.Client/ContextMenu/UI/EntityMenuUIController.cs b/Content.Client/ContextMenu/UI/EntityMenuUIController.cs index 073164b20f..21ebd8e74e 100644 --- a/Content.Client/ContextMenu/UI/EntityMenuUIController.cs +++ b/Content.Client/ContextMenu/UI/EntityMenuUIController.cs @@ -260,6 +260,8 @@ namespace Content.Client.ContextMenu.UI { var subElement = new EntityMenuElement(entity); subElement.SubMenu = new ContextMenuPopup(_context, subElement); + subElement.SubMenu.OnPopupOpen += () => _verb.OpenVerbMenu(group[0], popup: subElement.SubMenu); + subElement.SubMenu.OnPopupHide += subElement.SubMenu.MenuBody.DisposeAllChildren; _context.AddElement(subMenu, subElement); Elements.TryAdd(entity, subElement); }