New issue
Advanced search Search tips

Issue 917979 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

The viewport height is including height of the status bar when the address bar is hidden

Reported by enjoy.ja...@gmail.com, Dec 27

Issue description

Steps to reproduce the problem:
1. When address bar is shown document.documentElement.clientHeight returns the actual area height.
2. When the screen is scrolled down and the the address bar disappears with only the status bar.
3. Now the document.documentElement.clientHeight includes the status bar height as well.

What is the expected behavior?
document.documentElement.clientHeight should not include the status bar height.

What went wrong?
The viewport height is including height of the status bar when the address bar is hidden

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 71.0.3578.99  Channel: stable
OS Version: 8.1.0
Flash Version:
 
Labels: Needs-triage-Mobile
Cc: chelamcherla@chromium.org
Labels: Triaged-Mobile Needs-Feedback
@ enjoy.jayabratha: Please provide test url along with screencast on reproducing the issue, this would help in further triaging.

Thanks! 
Please go to https://jayabratha.com/art using Chrome on Android. In the art gallery I have created an animation that zoom in the image to open it in gallery. Here to animate from its gallery location to full screen centered location I need to calculate its position using the screen height and the image dimension. To get the viewport height I used document.documentElement.clientHeight. So when the address bar is not present the document.documentElement.clientHeight is adding the status bar height as well and thus the image is not animated to the center.
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 7

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
This issue happens in Edge and Chrome mobile but works correctly on Firefox mobile
Components: Blink
Labels: Needs-Feedback
@enjoy.jayabratha: Navigated to https://jayabratha.com/art,scrolled down so address bar hides and image is fully seen. Attaching screencast for reference, could you please check and point out what the issue is?

Thanks!
20190108_152708.mp4
13.5 MB View Download

Sign in to add a comment