react-hint icon indicating copy to clipboard operation
react-hint copied to clipboard

Not working with CSS transforms

Open trusktr opened this issue 7 years ago • 2 comments

react-hint is having the same issue as with react-tooltip and with popper.js (see solution concept there) in that it doesn't work with transformed containers (specifically scale).

Just try adding transform: translateX(-149px) scale(0.8); to your demo container, then you'll see the tooltips are no longer aligned properly.

It'd be awesome if this was supported!

I'm looking for a lib that can handle transforms. I might just have to roll my own if I can't find one.

trusktr avatar Sep 20 '18 06:09 trusktr

Thanks for this issue! I'll try to check if it's easily solvable and update you on my findings.

slmgc avatar Sep 25 '18 20:09 slmgc

After giving it some thought, I've decided not to support this edge case as it complicates the implementation and will introduce more positioning issues. As a solution for your case, you can try applying the same transformations to the tooltip itself.

slmgc avatar Oct 01 '18 17:10 slmgc