ReactTooltip / react-tooltip

React Tooltip Component
https://react-tooltip.com/
MIT License
3.62k stars 527 forks source link

Tooltip misalignment when scrolling #1227

Open hemae opened 1 month ago

hemae commented 1 month ago

Bug description When using tooltips inside scrollable containers (specifically the window), the tooltip appears correctly next to the target element in the initial scroll state (see Screenshot 1). However, after scrolling the parent element (window), the tooltip appears misaligned—either above or below the target element (see Screenshot 2).

Version of Package v5.28.0

To Reproduce

Expected behavior The tooltip should remain aligned with the target element regardless of the scroll position.

Screenshots

Screen Shot 2024-09-20 at 3 22 57 PM Screen Shot 2024-09-20 at 3 23 03 PM

Desktop:

gabrieljablonski commented 1 month ago

Have you tried moving the tooltip component inside the scrollable parent? That usually fixes the issue, but depending on your project's structure, it might not be viable for you to do.

Let me know, and I'll try to suggest some other approach.