Skip to content
Discussion options

You must be logged in to vote

@xiaoxiaobt the DevTools :hover toggle only applies the CSS pseudo-class, it doesn't fire JavaScript events. radix tooltip uses onPointerMove / onPointerLeave exclusively for open/close logic (tooltip.tsx), not CSS :hover. so forcing :hover via DevTools has no effect.

to inspect the tooltip in DevTools:

1. force it open via props:

<Tooltip.Root open={true}>
  <Tooltip.Trigger>Hover me</Tooltip.Trigger>
  <Tooltip.Portal>
    <Tooltip.Content>Tooltip text</Tooltip.Content>
  </Tooltip.Portal>
</Tooltip.Root>

2. tab-focus the trigger. onFocus also opens the tooltip (for accessibility), so pressing Tab to focus the trigger button works. combine with Chrome's "Emulate a focused page" (Renderi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xiaoxiaobt
Comment options

Answer selected by xiaoxiaobt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants