Skip to content

fix: hide unmeasured tooltips during exit - #10502

Open
devo-id wants to merge 3 commits into
adobe:mainfrom
devo-id:fix/tooltip-unmeasured-exit
Open

fix: hide unmeasured tooltips during exit#10502
devo-id wants to merge 3 commits into
adobe:mainfrom
devo-id:fix/tooltip-unmeasured-exit

Conversation

@devo-id

@devo-id devo-id commented Aug 24, 2026

Copy link
Copy Markdown

Closes #10496

When a Tooltip starts its exit animation before its position has been calculated, it can remain mounted with the fallback position: fixed; top: 0; left: 0 styles and briefly appear at the top-left of the viewport.

This change hides the tooltip when it is closed and does not have a computed placement:

visibility: !placement && !state.isOpen ? 'hidden' : undefined

Normally positioned tooltips and their exit animations are unchanged.

Pull Request Checklist:

Test Instructions:

  1. Run:
    yarn jest packages/react-aria-components/test/Tooltip.test.js

  2. The regression test hides unmeasured tooltips during exit animation should fail on upstream/main and pass with this change.

  3. Also verified:

    • yarn jest packages/react-aria-components/test/Toolbar.test.tsx
    • yarn jest packages/react-aria/test/overlays/useOverlayPosition.test.tsx
    • yarn jest packages/react-aria-components/test/Popover.test.js
    • yarn oxlint packages/react-aria-components/src/Tooltip.tsx packages/react-aria-components/test/Tooltip.test.js
    • yarn oxfmt --check packages/react-aria-components/src/Tooltip.tsx packages/react-aria-components/test/Tooltip.test.js

@devo-id

devo-id commented Aug 24, 2026

Copy link
Copy Markdown
Author

I investigated the failing s2-docs check locally by running the same build on both my PR branch and upstream/main. Both fail at packages/dev/s2-docs/pages/s2/dnd.mdx:41 because ./DroppableCOMPONENT cannot be resolved. So this appears to be an existing upstream docs build issue, unrelated to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Combination of Toolbar and Tooltip causes glitching on Tooltip

1 participant