New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 801621 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

CSS position: fixed height is incorrect on Android

Reported by yves.goe...@gmail.com, Jan 12 2018

Issue description

Steps to reproduce the problem:
An element with fixed position and full height has the wrong height. While Firefox (Android, Windows) and Chrome (Windows) show it correctly, there are two issues in Chrome (Android).

top: 0; bottom: 0 -> the element spans the entire body which is higher than the viewport

top: 0; height: 100vh -> the element spans the viewport height as if the URL bar wasn't there. But when it is there, and normally it is, the element is clipped at the bottom.

What is the expected behavior?
Both alternatives should render the element at full height and completely visible, unclipped. Other browsers can do this effortlessly, even while scrolling and changing the viewport height when the URL bar goes in and out.

What went wrong?
see above

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 63.0.3239.111  Channel: stable
OS Version: 7.1
Flash Version: n/a
 
The problem seems to be that the element isn't fixed. While the CSS clearly says that and all other browsers/platforms regard it, Chrome/Android ignores it and treats it like "absolute" instead of "fixed". That would explain the strange "bottom" positioning and the fact that the element scrolls up away with the rest of the page instead of stick to where it belongs.
Additionally the reported window height doesn't update when the URL bar disappears. Even though the window.resize event is triggered at the right time and I can handle it, the reported height remains the same as if the URL bar was still there. (Firefox/Android does it correctly, too.)
Here's a testcase for this. I've kept it as short as possible. Anything that looks unnecessary to you is required by my application.

There are three panels fixed at the left side. The first (red) has "height: 100vh". The second (blue) has "bottom: 0" instead. And the third (green) is resized by a script from the window height, but only on resize events, so not on page load, and it also logs the window height with each resize event.

You can scroll the page up and down.

Watch the three panels do funny dancing. None of this happens anywhere else, nor is it correct.

I've tested it with:
* Chrome 63 on Windows 10 and Android 7.1
* Firefox 57 on Windows 10 and Android 7.1
* Edge 16 on Windows 10
* IE 11 on Windows 10

test.html
1.8 KB View Download

Comment 4 by meade@chromium.org, Jan 16 2018

Here's a clicky version of the test case: https://jsfiddle.net/bsb0arod/

I tested this on linux and could not reproduce. Switching to windows now.


Labels: Needs-triage-Mobile

Comment 6 by meade@chromium.org, Jan 16 2018

Summary: CSS position: fixed height is incorrect on Android (was: CSS position: fixed)

Comment 7 by meade@chromium.org, Jan 16 2018

Labels: Needs-Bisect
Status: Untriaged (was: Unconfirmed)
The jsfiddle link doesn't really demonstrate the issue on Android - better to use the attached test case. But I could definitely repro on Android. Requesting a bisect in case this is a regression.
Cc: nyerramilli@chromium.org pnangunoori@chromium.org sandeepkumars@chromium.org
Labels: -Needs-Bisect M-65 Triaged-Mobile
Tested the issue in Android and able to reproduce the issue. Similar behavior is observed since Chrome #50.0.2624.0

Steps Followed:
1. Launched the Chrome Browser.
2. Open the test filed provided in the C#3
3. Observed the following observations:
> User is able to scroll the red box till "end" text is displayed.
> User is not able to scroll till the bottom in the blue box. User an scroll only till 5th 'more' text is displayed, later complete window gets scrolled.

4. However in the latest Canary and Stable the behavior is same for red and blue boxes. User is not able to scroll till 'end' text is displayed.

Chrome versions tested:
50.0.2624.0, 59.0.3030.0, 63.0.3239.111(Stable), 65.0.3322.0(Canary)

OS:
Android 8

Android Devices:
Pixel 

This seems to be a Non-Regression issue as same behavior is seen since M50. Removing 'Needs-Bisect' label and leaving the status as Untriaged for further input's on this issue.

Please navigate to below link for log's and video--
go/chrome-androidlogs/801621

Note: 
Issue is not observed on FireFox mobile version.

Comment 9 by shend@chromium.org, Jan 17 2018

Status: Available (was: Untriaged)
Project Member

Comment 10 by sheriffbot@chromium.org, Jan 18 (4 days ago)

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 11 by e...@chromium.org, Jan 21 (2 days ago)

Labels: -Pri-2 Pri-3
Status: Available (was: Untriaged)

Sign in to add a comment