From 1c5d80cf724f50775504370ac59521288c8b6867 Mon Sep 17 00:00:00 2001 From: Ian Bolton Date: Tue, 7 Nov 2023 12:02:44 -0500 Subject: [PATCH] :bug: Fix layout bug on row click (intermittent) (#1518) - Addresses an issue with the drawer click functionality which occurs when clicking in-between the columns on a table. The entire layout is left in an unrecoverable state. https://github.com/konveyor/tackle2-ui/assets/11218376/a3425889-f5f9-4beb-99b1-4c768df0bea4 Signed-off-by: ibolton336 --- client/src/app/components/PageDrawerContext.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/app/components/PageDrawerContext.tsx b/client/src/app/components/PageDrawerContext.tsx index 7a6c95ed05..a7bb01da55 100644 --- a/client/src/app/components/PageDrawerContext.tsx +++ b/client/src/app/components/PageDrawerContext.tsx @@ -160,9 +160,11 @@ export const PageDrawerContent: React.FC = ({ }, [drawerPanelContentProps, setDrawerPanelContentProps]); // If the drawer is already expanded describing app A, then the user clicks app B, we want to send focus back to the drawer. - React.useEffect(() => { - drawerFocusRef?.current?.focus(); - }, [drawerFocusRef, focusKey]); + + // TODO: This introduces a layout issue bug when clicking in between the columns of a table. + // React.useEffect(() => { + // drawerFocusRef?.current?.focus(); + // }, [drawerFocusRef, focusKey]); React.useEffect(() => { const drawerHead = header === null ? children : header;