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?
Asked
Active
Viewed 1,169 times
3
-
Could you show the relevant code? – Chris May 24 '22 at 17:55
1 Answers
-1
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.

Sergej Klackovskis
- 453
- 2
- 5
-
Hi! :) could you expand a bit more your solution? I haven't been able to solve it. I executed `ReactTooltip.rebuild()` inside `overridePosition` but it did not work in all cases – Nico Serrano Jan 03 '23 at 04:28