Skip to content

Commit

Permalink
Merge pull request #5765 from matuzalemsteles/LPS-203851-2
Browse files Browse the repository at this point in the history
fix(@clayui/core): LPS-203851 fixes bug when keeping DropDown open in TreeView actions in Firefox
  • Loading branch information
matuzalemsteles authored Feb 15, 2024
2 parents 3accbcd + e1436c6 commit 87d2436
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/clay-core/src/tree-view/TreeViewItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ export const TreeViewItem = React.forwardRef<
onBlur={(event) => {
if (
actions &&
event.relatedTarget &&
!item.itemRef.current?.contains(
event.relatedTarget as HTMLElement
)
Expand Down
8 changes: 6 additions & 2 deletions packages/clay-core/stories/TreeView.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,12 @@ export const Actions = () => (
</Button>
<DropDownWithItems
items={[
{label: 'One'},
{label: 'Two'},
{
href: '#',
label: 'One',
onClick: (event) => event.preventDefault(),
},
{href: '#', label: 'Two'},
{label: 'Three'},
]}
trigger={
Expand Down

0 comments on commit 87d2436

Please sign in to comment.