Skip to content

[RAC] Tooltip is misaligned when using a CSS scale transition animation on [data-entering] #8291

Open
@ghost

Description

Provide a general summary of the issue here

Hello! First, thank you for the awesome lib!

To be direct, I found that the Tooltip component doesn't center when there's a scale transition animation on [data-entering]. The smaller the initial scale, the more it shifts to the right.

🤔 Expected Behavior?

That the Tooltip is animated and respects the "placement" prop, without layout shifts.

😯 Current Behavior

If the "placement" prop is set to "top", "top right", "bottom", or "bottom right", its position becomes incorrect, shifting further to the right.

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

Here's a sandbox that shows it more clearly:

https://codesandbox.io/p/devbox/bug-report-react-aria-tooltip-flwz8v?file=%2Fsrc%2FApp.tsx

Version

react-aria: 3.40.0 / react-aria-components: 1.9.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Windows 11

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions