Closed Bug 1336342 Opened 8 years ago Closed 6 years ago

[viewport] screen.height and window.innerHeight sends value minus the size of the toolbar

Categories

(Core :: Panning and Zooming, defect, P3)

54 Branch
ARM
Android
defect

Tracking

()

RESOLVED DUPLICATE of bug 1064982
Tracking Status
firefox54 --- affected

People

(Reporter: karlcow, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [webcompat][gfx-noted])

Which ever value of the viewport we chose, when loading a page for Firefox or Chrome, the height of the screen and the innerHeight are different. Chrome seems to take the full screen size, while Firefox gives the screen size minus the toolbar height. See for example http://la-grange.net/2016/12/01/viewport/viewport-test-0004.html Firefox 3: window.devicePixelRatio 360 px: window.screen.width 592 px: window.screen.height 360 px: window.innerWidth 592 px: window.innerHeight Chrome 3: window.devicePixelRatio 360 px: window.screen.width 640 px: window.screen.height 360 px: window.innerWidth 640 px: window.innerHeight
Whiteboard: [webcompat]
Summary: [viewport] screen.height and window.innerHeight sends value without the size of the toolbar → [viewport] screen.height and window.innerHeight sends value minus the size of the toolbar
Component: Graphics, Panning and Zooming → Panning and Zooming
OS: Unspecified → Android
Priority: -- → P3
Product: Firefox for Android → Core
Hardware: Unspecified → ARM
Whiteboard: [webcompat] → [webcompat][gfx-noted]
What version of Chrome was this using? Chrome's innerHeight shouldn't include the Android system bar (and hasn't ever AFAIK), while screen.height does. E.g., on my phone, using bokand.github.io/innerHeight.html on Chrome 62 I get: With URL bar hidden: innerHeight: 747 screen.height: 823 With URL bar shown: innerHeight: 691 screen.height: 823 On the same phone Firefox reports: With URL bar hidden: innerHeight: 741 screen.height: 768 With URL bar shown: innerHeight: 693 screen.height: 768 Interestingly, innerHeight here differs by 6px when the URL bar is hidden on the same device - they should be the same size... For screenHeight, I'm guessing Firefox doesn't include the Android "Navigation Bar" height (the button bar at the bottom of the screen).
(Setting ni? to Karl for David's question)
Flags: needinfo?(kdubost)
Tests in Comment #3 were bogus.
This is a duplicate of bug 1064982 as per the results in comment 3.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.