-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Popup is incorrectly positioned if prop open is set to true on initial render #2381
Comments
@fracmak in your codesandbox example, you have an |
I still think this is a bug, the positioning of the popup isn't correct when you use the prop values to open and close the popup |
@fracmak Playing around with this some more, and digging into the docs, it appears that the I looked through the code for @layershifter @levithomason Is there a reason we are not handling this? I have a feeling it might be because the component needs to mount first in order to set the positioning styles on the popup. |
The use case I've run into is I want to have a close button inside the pop-up so I wanted to control the opening and closing of the pop-up myself but the positioning doesn't work under this one use case and the use case of triggering opening a pop-up without the trigger |
Duplicate #1065. |
Popup onOpen and onClose handlers aren't getting called correctly on open prop, so it doesn't render properly
Steps
Create popup component with open={true} and a trigger
Expected Result
Expect the popup to render near the trigger
Actual Result
Popup is rendered top right corner of the screen
Version
0.77.1
Testcase
https://codesandbox.io/s/py63r935qq
The text was updated successfully, but these errors were encountered: