How to properly deal with portal containers and the fullscreen API? #9206
Unanswered
janvorwerk
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Thanks for the discussion. We created the PortalProvider partially because someone needed to make use of fullscreen. It doesn't look like the group that needed fullscreen support contributed any tests however and we don't make use of it ourselves at the moment, so there may be some gaps we're unaware of. Would you be willing to put together a small test app in codesandbox or stackblitz or even in our storybook? That's probably the easiest way to diagnose what's going on or if it's just differing expectations. At the very least, I think you're on the right track |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello gents,
My app is using the DOM fullscreen API for several cases.
Let's consider two of them:
By default, case 1 does not work because as soon as the component goes fullscreen, the
document.bodyseems no longer visible so that any portaled component isn't either.What I thought was a very smart move was to use the PortalProvider… despite the fact that it was flagged "UNSAFE".
Clever, ugh? Actually not so much because then, case 2 won't work any longer : as soon as the video goes fullscreen, the portal is changed, so that the dialog containing the video node vanishes…
Then I tried to be more clever than ever 😁…
… but then case 1 no longer works properly…
Hence my questions: did you guys consider using/supporting fullscreen? How did you do?
Many thanks in advance 🙏
Beta Was this translation helpful? Give feedback.
All reactions