Open Bug 2073972 Opened 2 months ago Updated 1 month ago

Extra padding appears below m.youtube.com Navigation Bar

Categories

(GeckoView :: General, defect)

Firefox 158
All
Android
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: r_faizaan, Unassigned, NeedInfo)

Details

Attachments

(1 file)

Steps to reproduce:

I can reproduce this at will by following these steps:

  1. Open Firefox Fenix
  2. Go to m.youtube.com
  3. Go to the browser's Settings > Customize
  4. Set Address bar location to Top
  5. Set Toolbar layout to Simple
  6. Enable Scroll to hide toolbar
  7. Scroll down and up on the page

Environment:
Version: 158.0a1
Build ID: 20260919215217

  • Locally built Nightly from mozilla-central
  • Reproducible on both an emulator (mozemulator-android34-x86_64) and my physical Samsung Galaxy S23 FE with Android version 16, One UI version 8.5

Actual results:

Extra padding appears below Youtube's navigation bar at the bottom of the page. When scrolling up and the address bar is revealed. The extra padding disappears when scrolling down and the address bar is hidden.

Additional Notes:

  • Does not occur on Google Chrome or Samsung Internet using the same device, same steps
  • Does not occur when Address bar location is set to Bottom instead of Top
  • Does not occur when Scroll to hide is disabled

Expected results:

There is no extra padding below YouTube's navigation bar.

The severity field is not set for this bug.
:owlish, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bugzeeeeee)

I would like to attempt fixing this myself if no one else is working on it. I'm new to the Gecko codebase, so if anyone can point me toward the code that handles this interaction between the dynamic toolbar and bottom-fixed content, I would appreciate it.

Here are some observations I made, on an Android 34 emulator with 3-button navigation and the address bar set to Top:

  • The navigation bar on m.youtube.com is an HTML component named ytm-pivot-bar-renderer
  • This bottom padding is computed from env(safe-area-inset-bottom)
  • To check the env() value without YouTube’s CSS involved, I ran this in the console:
    (() => { const d = document.createElement('div'); d.style.paddingBottom = 'env(safe-area-inset-bottom)'; document.body.appendChild(d); const v = getComputedStyle(d).paddingBottom; d.remove(); return v; })()
  • On Firefox, with the toolbar visible: 36.3px
  • On Firefox, with toolbar hidden: 0px
  • On Chrome on the same emulator, with the toolbar visible or hidden: 0px
  • 36.3px matches the height of the system navigation bar (121 device px ÷ devicePixelRatio 3.333)

I’m not sure whether Firefox’s value or the page’s use of it is at fault, but the first thing to investigate could be why Firefox returns a non-zero value for env(safe-area-inset-bottom) when the toolbar is visible.

After further exploration, this may be a duplicate of bug 2057232

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: