From f1a7dc650b2d10b8e64d93455feee2ba8205fd84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matuzal=C3=A9m=20Teles?= Date: Fri, 9 Feb 2024 13:38:22 -0600 Subject: [PATCH 1/2] fix(@clayui/core): LPS-203851 fixes bug when keeping DropDown open in TreeView actions in Firefox --- packages/clay-core/src/tree-view/TreeViewItem.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/clay-core/src/tree-view/TreeViewItem.tsx b/packages/clay-core/src/tree-view/TreeViewItem.tsx index d41cffa343..2372f64216 100644 --- a/packages/clay-core/src/tree-view/TreeViewItem.tsx +++ b/packages/clay-core/src/tree-view/TreeViewItem.tsx @@ -265,6 +265,7 @@ export const TreeViewItem = React.forwardRef< onBlur={(event) => { if ( actions && + event.relatedTarget && !item.itemRef.current?.contains( event.relatedTarget as HTMLElement ) From e1436c6a0ca52d50298e9eeca672de960c5700fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matuzal=C3=A9m=20Teles?= Date: Thu, 15 Feb 2024 11:13:28 -0600 Subject: [PATCH 2/2] chore(@clayui/core): update the story with the bug reproduction --- packages/clay-core/stories/TreeView.stories.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/clay-core/stories/TreeView.stories.tsx b/packages/clay-core/stories/TreeView.stories.tsx index 186b83e235..074b3f4735 100644 --- a/packages/clay-core/stories/TreeView.stories.tsx +++ b/packages/clay-core/stories/TreeView.stories.tsx @@ -242,8 +242,12 @@ export const Actions = () => ( event.preventDefault(), + }, + {href: '#', label: 'Two'}, {label: 'Three'}, ]} trigger={