Open Bug 1663634 Opened 4 years ago Updated 2 months ago

Firefox doesn't handle body with height 100vh properly with overflow:hidden on the root element

Categories

(Core :: Layout, defect, P3)

Unspecified
All
defect

Tracking

()

REOPENED

People

(Reporter: petru, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [layout:backlog:quality])

Attachments

(1 file)

Reported on Fenix - https://codepen.io/radhifadlillah/full/bGpaOGy

Steps to reproduce

  • Create a HTML page
  • Set its body height to 100vh
  • Put something (p maybe), set it to the bottom of the body
  • Open the page in Firefox Mobile

Here is the pen to reproduce it.

Expected behavior

The bottom area should be visible.

Actual behavior

The paragraph is hidden in Firefox, no matter where the address bar located

Device information

Tested in Redmi Note 8 running MIUI Global 11.0.5 (Android 9). I tried in both Firefox stable and nightly :

  • Firefox Daylight - GV 80.0.1
  • Firefox Nightly - GV 82.0a1

It's also out of the viewport on Chrome. What's the problem?

(In reply to Hiroyuki Ikezoe (:hiro) from comment #1)

It's also out of the viewport on Chrome. What's the problem?

Using the above pen I see that on Android Chrome allows for scrolling to see that paragraph - video
Also both the Chrome and Firefox desktop apps show the paragraph without the need to scroll.

Thank you Petru for the clarification. Then I'd say it's a dup of bug 1662823. The code pen case is exactly same case what I posted in bug 1662823.

Awesome! Thank you!

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Attached file An example

This case is slightly different from others (e.g. bug 1663000) in terms of CSS, and the difference causes a big difference on behaviors.

So the CSS difference is the root element has overflow: hidden. It's quite unclear yet for me whether the root element is clipped by the ICB or the vh unit size.

Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---

I asked :birtles to try the example in comment 5 on his iPhone, and on the iPhone the dynamic toolbar moves.

Summary: Firefox doesn't handle body with height 100vh properly → Firefox doesn't handle body with height 100vh properly with overflow:hidden on the root element
Component: General → Layout
Priority: -- → P1
Product: GeckoView → Core
Priority: P1 → --
Severity: -- → S3
Priority: -- → P2
Whiteboard: [layout:backlog:quality]

I'm raising the webcompat priority here a significantly. There are a lot of applications that depend on the behavior of https://github.com/mozilla-mobile/fenix/issues/14839 working, mainly stuff that has important things fixed to the lower edge of the screen. One example here is the message feature on kijiji.ca, where the dynamic toolbar pretty much covers the message bar perfectly and you have no way of ever reaching that.

This probably causes a lot of issues that we're not even aware of... :(

Webcompat Priority: --- → P1

Resetting Webcompat Priority since the webcompat issue is totally different from this bug. I filed bug 1717374 for the webcompat issue.

Webcompat Priority: P1 → ?

The CSSWG decided to add a Note like this; "overflow:hidden on the root might not clip everything outside the ICB if the ICB is smaller than the viewport, which can happen on mobile". This note sounds allowing browsers to do an irregular behavior. Indeed the irregular behavior is quite odd (at least for me).

So, I am inclined to not to fix this, instead we should implement new viewport units (bug 1723061) which will, I believe, let web developers avoid using 100vh and overflow:hidden at the same time. Degrading priority for now.

Priority: P2 → P3
See Also: → 1723061

Hello all, I'm not sure if I should open a new issue for this because it seems like it might be related to this one, but on Android devices without physical back buttons, etc on them, you have a virtual button toolbar on the bottom that obscures the bottom of all pages. When displaying any content that is supposed to use 100 percent of the viewport, the bottom is hidden and the user must scroll down to see content that was already supposed to be visible. Since it's always there, I feel like this toolbar should be excluded from the HTML viewport, unless there is a better solution.

(In reply to nthomas from comment #12)

When displaying any content that is supposed to use 100 percent of the viewport, the bottom is hidden and the user must scroll down to see content that was already supposed to be visible.

That's definitely a different issue. It would be nice to open a new bug, it would also be nice to have a simple test case. Thanks!

(In reply to Hiroyuki Ikezoe (:hiro) from comment #13)

(In reply to nthomas from comment #12)

When displaying any content that is supposed to use 100 percent of the viewport, the bottom is hidden and the user must scroll down to see content that was already supposed to be visible.

That's definitely a different issue. It would be nice to open a new bug, it would also be nice to have a simple test case. Thanks!

Great, thank you very much, I just wanted to check here first before I went and opened a new ticket. I will also provide all the necessary testing details.

Unsetting the WebCompat Priority flag here based on Comment 10 and Comment 11, so we don't have any real-site-breakage for this issue. However, there still is bug 1123938, which has P1 already.

Webcompat Priority: ? → ---

The severity field for this bug is relatively low, S3. However, the bug has 3 duplicates.
:dholbert, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dholbert)
Flags: needinfo?(dholbert)
See Also: → 1871448
See Also: 1871448
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: