Repository navigation
fix(tooltip): support focus trigger and preserve aria-describedby - #78
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b00582fd5a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return () => { | ||
| const { | ||
| trigger = ['hover'], | ||
| trigger = ['hover', 'focus'], |
There was a problem hiding this comment.
Keep the tooltip open while either default trigger remains active
With the new default ['hover', 'focus'], a focused target closes when the pointer merely enters and then leaves it, even though focus remains. In packages/trigger/src/index.tsx, onMouseleave and onBlur each independently call triggerOpen(false) without tracking whether the other action is still active, so the mouse-leave event wins and no subsequent focus event reopens the tooltip. The default should not combine these actions until Trigger coordinates their active states, or Trigger should keep the popup open while either hover or focus remains active.
Useful? React with 👍 / 👎.
Summary
Upstream
Verification