Question: what is the difference between visual viewport and the layout viewport?
Answer: Visual Viewport concepts and usage The layout viewport covers all the elements on a page and the visual viewport is what is actually visible on the screen. When the user pinch-zooms into the page, the visual viewport shrinks but the layout viewport is unchanged.