From 6ef934299cf0cf1334709e67abf55311ea1eb247 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Thu, 5 May 2022 15:30:30 -0700 Subject: [PATCH] [!!!] EuiContextMenuPanels with `children` are still broken and do not correctly return focus :( - this is because of `shouldComponentUpdate` - the `items` API updates focus less than `children`, so `children` is still updating/hijacking focus after the popover focus trap returns focus to the button --- .../context_menu/context_menu_panel.spec.tsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/components/context_menu/context_menu_panel.spec.tsx b/src/components/context_menu/context_menu_panel.spec.tsx index 148a0d07f22..1758b91118d 100644 --- a/src/components/context_menu/context_menu_panel.spec.tsx +++ b/src/components/context_menu/context_menu_panel.spec.tsx @@ -139,15 +139,12 @@ describe('EuiContextMenuPanel', () => { } {...rest} > - - Closes popover from context menu - - ), - ]} - /> + + {children} + + ); };