Full screen modals don't appear full screen (iOS Safari)
See original GitHub issueDescription
When I open a full screen modal on iOS safari it does not fill the full screen. There’s a gap at the bottom the screen.
Link to Reproduction
https://chakra-ui-git-fix-modal-height-ios-chakra-ui.vercel.app/docs/overlay/modal#modal-sizes
Steps to reproduce
On an iPhone
- Go to https://chakra-ui-git-fix-modal-height-ios-chakra-ui.vercel.app/docs/overlay/modal#modal-sizes
- Click on "open full modal’
- full modal does not cover full screen when the safari navigators aren’t there (see attached image)
Chakra UI Version
1.6.4
Browser
Safari on iPhone X 14.7.1
Operating System
- macOS
- Windows
- Linux
Additional Information
possibly caused by css styling below as removing it allows the modal to go full screen.
@supports (height: -webkit-fill-available)
modal:1.css-v9b9hc {
height: -webkit-fill-available;
}
However the above code was added to solve this other issue: https://github.com/chakra-ui/chakra-ui/pull/3806
Issue Analytics
- State:
- Created 2 years ago
- Reactions:12
- Comments:6
Top Results From Across the Web
Fullscreen for safari on Ipad - Apple Support Communities
Hi,. I would like to know can we view Safari in fullscreen mode for Ipad? If it is possible, how should I do...
Read more >Present full screen modal from anywhere, without reference to ...
I would like to present a full screen ViewController without any knowledge about the current ViewController hierarchy.
Read more >Fullscreen mobile modal. How hard can it be?
Let's talk about "fullscreen". How hard you expect it would be? Should be not hard - just use fullscreen div with z-index and...
Read more >How to present a full screen modal view using fullScreenCover()
Learn Swift coding for iOS with these free tutorials.
Read more >View Controller Presentation Changes in iOS 13
Default Modal Presentation Style Change ... The default presentation is now page sheet, not full screen. The header documentation for modalPresentationStyle says:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there a workaround to remove that specific CSS that seems to be causing the issue?
Edit: I found a workaround for my purposes. I’m not sure if this is the best way, or even a good idea, but sharing in case it is useful for others.
on top of @metanivek solution, i added height as well:
this worked for me.