floating-ui / floating-ui

A JavaScript library to position floating elements and create interactions for them.
https://floating-ui.com
MIT License
29.93k stars 1.6k forks source link

The tooltip should be visible when I hover over it. #2856

Closed ns-harshp closed 6 months ago

ns-harshp commented 6 months ago

Describe the bug When I hover over the tooltip, it disappears, but I want that tooltip to stay.

To Reproduce https://codesandbox.io/p/sandbox/react-floating-ui-tooltip-wvr3dk?file=%2Fsrc%2Ftooltip.tsx https://codesandbox.io/p/sandbox/floating-ui-react-dom-template-forked-38qgfm?file=%2Fsrc%2FApp.js

Steps to reproduce the behavior:

  1. Hover over the button
  2. When you see tooltip then hover over tooltip

https://github.com/floating-ui/floating-ui/assets/159230132/d21c43e7-7942-4413-a4e6-122f04a7e211

atomiks commented 6 months ago

See https://floating-ui.com/docs/useHover#safepolygon