primitives icon indicating copy to clipboard operation
primitives copied to clipboard

Use Owner document for selected components

Open ritz078 opened this issue 3 years ago • 4 comments

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.

ritz078 avatar Dec 18 '22 19:12 ritz078

@benoitgrelard @andy-hook This PR is ready now.

ritz078 avatar Dec 19 '22 06:12 ritz078

@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.

ritz078 avatar Mar 20 '23 08:03 ritz078

@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?

Nic0S avatar Jun 30 '23 16:06 Nic0S

@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.

chaance avatar Aug 16 '24 20:08 chaance

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.

chaance avatar Sep 27 '24 16:09 chaance