1 - Render a popup with a button (better if inside a custom component)
2 - Set the onOpen handler to simulate the button onClick or directly onClick to add a label to that button (managing this.setState for example, hence the custom component)
3 - Click the button in order to add a label to it
4 - Close the popup (by making any other action)
5 - Open the popup again, it should be located in the upper left corner of the screen (top: 0, left: 0)
The expected result was to see the Popup under or around the Trigger element
Actual result: 2nd render of popup is on coordinates 0,0
v0.83.0
https://codesandbox.io/s/62m4v7j13w
I've taken a peek at the <Portal> element controlling the popup behaviour, as well as the <RefXXX> elements. Sadly I don't have the time to investigate further, but I'm guessing that since the trigger element is re-rendered somewhere along the line the reference is lost, and thus the calculated positions are (0,0)
馃憢 Thanks for opening your first issue here! If you're reporting a 馃悶 bug, please make sure you've completed all the fields in the issue template so we can best help.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
We will switch to react-popper soon, it will resolve a ton of positioning issues.
@layershifter thanks for the quick answer!
Do you happen to have a timeline for this switch ?
Thanks a lot for your work/time!
I'm going to finish with it before 1 Apr, after it will be done I will push Levi to release it :)
@layershifter great news! Thanks again!
Should i close the issue then, or can we close it now?
It will be closed automatically 馃樅
Loving it!
Most helpful comment
I'm going to finish with it before 1 Apr, after it will be done I will push Levi to release it :)