floating-ui / react-popper

🍿⚛Official React library to use Popper, the positioning library
https://popper.js.org/react-popper/
MIT License
2.51k stars 226 forks source link

Wrong poper position on first click #113

Closed borm closed 6 years ago

borm commented 6 years ago

CodePen demo

https://react-popper-example-fies9l.stackblitz.io/

Steps to reproduce the problem

  1. Scroll to Toggleable Popper Example or Standalone Popper Example
  2. Make sure what element have position to bottom of viewport, in my case 73px
  3. Click to reference image

What is the expected behavior?

The poper should be displayed on top of reference

What went wrong?

The poper displayed on first time on bottom, then change position to top of reference ezgif-5-9b3c4143e4

Suggestion

set visibility: hidden; for poper initialize

FezVrasta commented 6 years ago

Oh... that's quite an edge case. Anyway I think the problem relies on Popper.js itself, may you open the issue in its repo? Thanks for the report.

partyelite commented 6 years ago

@borm Did you solve this problem? Could you plz give an example how to solve it with setting visibility to hidden for poper initialize?

borm commented 6 years ago

nope, sorry but i don`t remember how i suggested solution

drewlustro commented 2 years ago

@borm the worst 👎