Skip to content
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

Not working with modal #63

Open
shadowgroundz opened this issue Apr 23, 2021 · 5 comments
Open

Not working with modal #63

shadowgroundz opened this issue Apr 23, 2021 · 5 comments

Comments

@shadowgroundz
Copy link

If use modal with z-index, modal cannot appear when fullscreenmode

@svargas-dev
Copy link

svargas-dev commented Apr 28, 2021

I had this issue too – I got around it using react portals – supported in Material UI (Mui) and Chakra UI. The fullscreen API raises the fullscreen element to the maximum z-index level so the portal must be a child element of the fullscreen element or order to see it. I hope that helps.

@svargas-dev
Copy link

svargas-dev commented May 11, 2021

Actually, I ended up using another solution — using fscreen directly on the body element

@raulbarriga
Copy link

On another note, related to modals. I’m also using React portals with a custom modal which has a full screen button. My issue is that after I exit out of full screen and then exit the modal (which just sets it’s visible state to false), I find myself at the top of the webpage. For some reason, the full screen is doing this since exiting the modal without entering full screen just leaves me where I opened the modal. Any suggestions on how to fix this behavior?

@codebycarlos
Copy link

Thanks so much for that @svargas-dev. I went for your solution and it worked. Basically, I created a react provider component to initialise my own useFullScreenHandle function using fscreen and then that makes it available to be used across the app. I actually did the implementation almost exactly as react-fullscreen's (https://github.com/snakesilk/react-fullscreen/blob/master/src/index.tsx) - only difference as you suggest, setting the node to document.body. I think it's the only reliable way of doing it without messing up tooltips and modals. Would be handy for others maybe if it was included as part of this library?

@abhishekgowdak1997
Copy link

Hii guys ,I am also facing similar issue not getting Modal on fullscreen. I want to try using React portals approach can anyone share an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants