Open Bug 1209426 Opened 4 years ago Updated 3 months ago
Visual viewport should not include scrollbars, but inner
Width and inner Height should
The question is, if we have a page like: |<----- 16 ----->|1| +----------------+-+ - | |^| ^ | | | | | | | 5 | | | | | |v| v +----------------+-+ - |< >| | 1 +----------------+-+ - Should the viewport size be 16x5 or 17x6? (The viewport size can be measured via the 'vw' and 'vh' units) It's not quite clear to me which is correct. But it seems we have different behavior with other browsers anyway. Blink and Edge both use 17x6 for all cases. We use 17x6 when 'overflow' of :root is 'visible' or 'auto', but use 16x5 if 'overflow' is 'scroll'. In addition to the interop issue above, if we dynamically change the 'overflow' value, the change to the viewport size won't take effect for us until the next resize reflow.
This is a testcase for the reflow inconsistency issue. The red border shows the viewport area derived from 'vw' 'vh' units. You can click the "Toggle Overflow" button, and then resize the window a bit to see the inconsistency.
Assignee: nobody → bwerth
Summary: Viewport size sometimes does not count the viewport scrollbar area → Visual viewport should not include scrollbars, but innerWidth and innerHeight should
3 months ago
See Also: → 1575690
You need to log in before you can comment on or make changes to this bug.