Cannot create element covering entire visual viewport #8410
Labels
Closed as Question Answered
Used when the issue is more of a question than a problem, and it's been answered.
css-position-3
Current Work
css-values-4
Current Work
A common pattern is that a page needs to open something modal (e.g. a cookie dialog), and hence wants to mask off the normal content. The obvious way to do this would be:
This works fine, until the visual viewport is larger than the layout viewport. At that point you'll see some of the background page to the right and at the bottom.
There were some discussion on #7194 about adding new units for the visual viewport, but that was rejected.
So what would be the proper way to handle this scenario?
Using
<meta name="viewport" content="minimum-scale=1.0">
partially prevents the problem. But browsers ignore this when they are in "desktop site" mode.The text was updated successfully, but these errors were encountered: