gilbarbara / react-floater

Advanced tooltips for React
https://codesandbox.io/s/github/gilbarbara/react-floater/tree/main/demo
MIT License
220 stars 37 forks source link

react-floater overlay problem if container have overflow : auto #58

Closed gabrielsdimeli closed 5 years ago

gabrielsdimeli commented 5 years ago

🐛 Bug Report

I have my overlay component inside of a table with overflow auto for responsive but if overflow is activated then the overlay lose reference of the position of the target.

To Reproduce

Just create a div container with overflow : auto,

Expected behavior

Don't lose reference of the position of the target setted.

Link to repl or repo (highly encouraged)

https://codesandbox.io/s/clever-river-32mtq

gilbarbara commented 5 years ago

Hey,

I'm trying to understand why anyone would set overflow in an element without height. Your codesandbox isn't a real use case, so I really can't see what's wrong...

Anyway, this library uses popper.js for positioning so there's not much I can do. Take a look in their issues to see if there's a workaround or something.

gilbarbara commented 5 years ago

Anyway, you can pass popper.js options to this component, maybe there's one that can help with your case? Check their examples for more info.