-
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: doesn't reposition when changing its context #3478
Comments
Sorry, but we don't have time to debug your code. It looks crazy and I'm completely lost in it 🦏 |
Ok, I've now spent close to another two hours trying to compress this example even more. Luckily I could get rid of constate and the hack. Also, you don't even need to nest the popup. This is as short as it gets: The issues are still visible. I can't reopen the issue though since you already closed it and I'm no collaborator. |
Now it's clear to me, will try to find the root issue. |
Bug Report
I have a shared Popup that is meant to be used as a tooltip. I explicitly don't want to have a Popup associated with all items on my page that can have a tooltip because this creates a LOT of popups and hurts performance.
So my solution is to use global state via /~https://github.com/diegohaz/constate to share the ref of the DOM node where the Popup should be opened.
Sadly, positioning the popup via the
context
property doesn't work correctly in my use case.Steps
Expected Result
context
, the popup should be positioned at the updated context when it's opened the next time.context
Actual Result
context
DOM elementI suspect I could make it work if I could somehow wait until the popup is completely gone until reopening it again. I've tried several combinations of state logic but none has worked for me so far.
Even then it will probably still have issues with pointing at the correct corner.
Version
0.85.0
Testcase
https://codesandbox.io/s/vmm391vpv7
The text was updated successfully, but these errors were encountered: