duckduckgo / Android

DuckDuckGo Android App
https://play.google.com/store/apps/details?id=com.duckduckgo.mobile.android
Apache License 2.0
3.67k stars 878 forks source link

[Bug] window height with address bar #1997

Closed Jehfen closed 2 years ago

Jehfen commented 2 years ago

Describe the bug

The window height with address bar is not correct. You should support css fill-available (or stretch)

How to Reproduce

go to a website on a mobile device. 100vh (100% height) containers are higher than the screen, because the height of the address bar is not subtracted from the available height.

Expected behavior

When using css fill-available the correct height should be used

Environment

- DDG App Version: latest
- Device: recent smartphone
- OS: Android
cmonfortep commented 2 years ago

Duplicated: https://github.com/duckduckgo/Android/issues/914

aarongarciah commented 11 months ago

This issue seems to be still relevant. DuckDuckGo reports a higher viewport height than Chrome on Android on the same device. See the screenshots below and the rendered value for window.innerHeight.

Apart from that, Chrome updates the window.innerHeight value when the viewport is scrolled, and the top navigation bar is hidden. window.innerHeight doesn't get updated in DuckDuckGo when the viewport is scrolled and the top navigation bar is hidden.

This issue causes -webkit-fill-available and the newer dvh and svh CSS viewport units to not work properly. 100vh, 100dvh and 100svh always result in the same size.

Chrome DuckDuckGo
Chrome DuckDuckGo