Tooltip positioning is broken from v3.1.5
In version 3.1.4 it works fine, but from 3.1.5 a tooltip becomes pulled to top. Check, please, what has been changed. I assume that it works well in your environment, but we have this strange issue and it depends on version.
are you using getcontent?
yes
can you try 3.1.6, if it doesn't work, could you show me mor detail of your code, currently I dont know how to reproduce your problem
@pokidovea If any of your css classes uses a transform, tooltips will probably fail miserably. Take a look @ the new attribute introduced in 3.1.5: countTransform. You might need to set it to false.
@wwayne Not that I have a better idea, but I'm not sure breaking on a transform != "none" is the best one. The offsets have been wrong for every calculation of the parent's location wherever I have transforms, so I'm forced to use countTransform=false everywhere. Maybe that's the intended use case, but here's a simple example:
ReactDOM.render(
<div style={{textAlign: "center"}}>
<p style={{
transform: "translate(0, 0)"
}} data-tip="This is a react-tooltip">
Some text
</p>
<ReactTooltip />
</div>,
...
);
FYI I stumbled on this issue because the Google material design icons package (https://github.com/Templarian/MaterialDesign) adds the same transform I used in the example above in it's base 'mdi' classes.
@cklab, thanks! Setting countTransform to false solved the problem.
@wwayne is there a way to force the position of the tooltip? Right now @3.1.6 I'm setting position bottom, but seems that depending of the length of the text it changes to another position.
@iamgutz Yeah it will adjust position automatically and no option for keep it for the moment...maybe I need to add an option fot this in the future