Slider: tooltip stays in absolute position when component is hidden or scrolls across screen

Created on 1 Dec 2017  路  7Comments  路  Source: react-component/slider

having an issue where I show the tooltip all the time when slider is open, but this causes issues as there are times when component is hidden but the tooltip still stays, or when I scroll down and the tooltip's rendered position is no longer in even position with the component that rendered it

Need Reproduce

Most helpful comment

@borwahs I actually found a solution here:

https://github.com/react-component/tooltip/issues/41#issuecomment-298435904
getTooltipContainer works as long as the slider has a parent that has position relative

All 7 comments

I am also facing same issue

Could you reproduce your issue on https://codesandebox.io?

@yesmeck - I have ran into the issue when using a div element that is scrolling within another div (set to 100vh).

Here is my reproduced example: https://codesandbox.io/s/3x5z243mq5

I didn't see a relevant issue in rc-tooltip, but haven't found the relevant spot it updates the absolute positioning.

I am also facing this issue is there any solution?

@joel-gouveia - I tried to find a solution but ran out of time debugging it. I have moved on to react-rangeslider.

Sent with GitHawk

@borwahs I actually found a solution here:

https://github.com/react-component/tooltip/issues/41#issuecomment-298435904
getTooltipContainer works as long as the slider has a parent that has position relative

@joel-gouveia - nice find!

Sent with GitHawk

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nitroamos picture nitroamos  路  4Comments

eldyvoon picture eldyvoon  路  6Comments

ka7eh picture ka7eh  路  6Comments

gpinhey picture gpinhey  路  6Comments

ka7eh picture ka7eh  路  3Comments