Description
Hi! Thanks so much for this library. Encountering the re-parent issue was super headache inducing but so grateful for the elegant solution y'all have provided here. Was sad to see there's no "buy me a beer" button anywhere :P
I'm using the package for an in-house popover cell solution. My re-parent use case is that as the user would interact with a non-focused cell within a grid, (let's say increment a numeric value) the value would be lost due to the state not being persistent. Reverse-portals solved that! And was excited to see that I was still able to portal the out portal. now you're thinking with portals
However, since the events being sent trigger when the element is traversing through the portals, it doesn't seem to be firing on the portal itself. Is there a work around for this? I'm going to try and solve this by capturing the events and forwarding them to the element later.
Note: this still persists even when I remove the secondary portal.
Another issue tangential to this race condition/edge case is that refs seem to be struggling when moving through the portal. So in my case, an anchorEl is losing track, and a dropdown menu is relocating to 0,0. This issue is probably something I can resolve on my own though, and not sure if there's even any avenues for the library to solve problems like this one.
Here's a demo of this occurring. Notice that when I click into the cell, the Portal-A cell has focus, but after being moved to Portal-B, it loses focus. You can also see the drop down flickering, and not seen here is when doesn't actually find the ref later.
firefox_0iFBPHa9kZ.mp4
Lmk if there's anything I can do to provide more context, or if you are aware of potential solutions here!