Use Owner document for selected components
Description
Related to #1677 and #1721
Use ownerDocument instead of document in the following components:
- PopOver
- FocusScope
- Toolbar
- Menu
- Popper
- RovingFocusGroup
- Select
- Toast
- HoverCard
- FocusGuard
The stitch styles do not get applied in the popup window because of how stitch is used here. Due to this issue, it's very hard to ensure that components like NavigationMenu are working correctly in the popup window.
@benoitgrelard @andy-hook This PR is ready now.
@benoitgrelard Can you tell me what needs to be done to consider this improvement? I can do whatever changes are necessary. This is a blocker for us, and I will be happy to contribute, but it's important that I understand the requirements before investing more time.
Thanks a lot for this excellent library.
If you are doing this on your end, I will happily close the PR. I can see that the related issue is labeled high priority.
@benoitgrelard any chance this could be considered? Our application uses multiple windows and this is a blocker for using the library. Does this change also fix the similar issue of Tooltips not dismissing correctly in popups / frames?
@ritz078 Sorry no one ever got back to you on this. If you can resolve conflicts I will prioritize this for our next release. If not, totally understand. I'll have to move it to my backlog otherwise.
Going to close this for now and just re-implement for the next release. There are some issues where we read browser globals in render that need to be addressed. I'll make sure to credit you as a co-author in the commit.