3

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

tbastue
  • 73
  • 5

1 Answers1

-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.

  • 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