Skip to content

Commit

Permalink
fix: keep tooltip open, when it wraps multiple children and we change…
Browse files Browse the repository at this point in the history
… which child ishovered

Signed-off-by: David Edler <david.edler@canonical.com>
  • Loading branch information
edlerd committed Apr 4, 2024
1 parent 10a094b commit 55da75d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Tooltip/Tooltip.tsx
Expand Up @@ -287,7 +287,8 @@ const Tooltip = ({

if (
e.relatedTarget
? !messageRef.current?.contains(e.relatedTarget)
? !messageRef.current?.contains(e.relatedTarget) &&
!wrapperRef.current?.contains(e.relatedTarget)
: e.target !== messageRef.current
) {
cancelableClosePortal();
Expand Down

0 comments on commit 55da75d

Please sign in to comment.