ReactTooltip has wrong position after scrolling

1.3k Views Asked by At

I use the ReactTooltip Component from 'react-tooltip' package. In my application, I have a scrollable modal in which the tooltips are used on some text. When I scroll in the modal, the tooltips get an offset in y direction and I dont know why. Could someone help me anchoring the tooltips so that they stick to the text they are applied on instead of moving when I scroll down?

Here is a picture of the issue: enter image description here

1

There are 1 best solutions below

1
On

Might be that tooltip position is wrongly calculated when scrolling inside the modal... Since in that case scrolling fires not inside the window but modal instead. You can use overridePosition property, calculate and overwrite y position of the tooltip.