floating-ui / floating-ui/popper.js.org

I need to scroll to get correct position

Open
#61 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
85
Forks
406
PR merge metrics
No merged PRs in 30d

Description

Hi Guys,
I've created a popover component using the popper js, but always initial position is redering wrong. To fix the position i need to scroll so after to interect with the DOM the position change and become perfect.
I'm using classes, fade-in & fade-out to control the visibility follow below the classes.
The animations are using opacity to looks smoother.

`&.fade-in {
animation: fade-in 0.5s ease;
visibility: visible;
}
`
`&.fade-out {
animation: fade-out 0.5s ease;
visibility: hidden;
}`

Before scroll:
![image](https://github.com/floating-ui/popper.js.org/assets/100690430/7114bdbf-b7cd-40e8-a8f4-c022696f3bf8)

After scroll:
![image](https://github.com/floating-ui/popper.js.org/assets/100690430/d9f06e69-ba40-45bc-968e-cd0f3a0d60f1)

Someone have faced it before or has some idea how to solve it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.