-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tooltip] Scaling the trigger whilst trying to open prevents opening #937
Comments
My initial thoughts:
|
Initial idea for a solution: If we want to keep closing when the trigger moves, we could ignore position changes ( |
It took me a long time to solve the problem,FK |
The issue is even more apparent/problematic when the tooltip trigger is inside a popover, as the popover gets repositioned then if the tooltip trigger is focused as the popover opens, it will instantly closed. |
What is the reason for wanting to close when the trigger moves? I'm currently experiencing a similar issue, but with different transforms like rotate and translate, so I don't think checking if the size changed will fix that. |
The initial reason was to avoid having a tooltip go over areas that are scrollable (given that it's portalled). |
After a bit of investigation, we will remove the current solution and implement a better solution based on scroll events.
|
* [Tooltip] Better "close on scroll" implementation Fixes #937 * Update Tooltip.tsx
This has been fixed and is available in the latest rc: https://www.npmjs.com/package/@radix-ui/react-tooltip/v/0.1.8-rc.2 |
* [Tooltip] Better "close on scroll" implementation Fixes radix-ui#937 * Update Tooltip.tsx
Bug report
Current Behavior
Originally from Discord (https://discord.com/channels/752614004387610674/803656530259738674/902977153715544137)
Expected behavior
The tooltip should open
Reproducible example
https://codesandbox.io/s/proud-wave-tjovb?file=/src/App.tsx
The text was updated successfully, but these errors were encountered: