Skip to content

fix(settings): Top content hidden on mobile#20141

Merged
vpomerleau merged 1 commit intomainfrom
FXA-13203
Mar 9, 2026
Merged

fix(settings): Top content hidden on mobile#20141
vpomerleau merged 1 commit intomainfrom
FXA-13203

Conversation

@vpomerleau
Copy link
Copy Markdown
Contributor

Because

  • Without viewport-fit=cover, browsers do not expose env(safe-area-inset-*) values to the page, causing content to render under the status bar or notch in embedded webview contexts
  • The sticky header would pin beneath the native chrome on scroll without a matching safe area offset

This pull request

  • Adds viewport-fit=cover to the viewport meta tag to unlock safe area inset values on iOS and Android
  • Adds padding-top: env(safe-area-inset-top) to body to keep content below the status bar on page load
  • Updates the sticky header's top offset to env(safe-area-inset-top) so it remains visible below the notch when scrolling

Issue that this pull request solves

Closes: FXA-13203

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

Because:

- Without viewport-fit=cover, browsers do not expose env(safe-area-inset-*) values to the page, causing content to render under the status bar or notch in embedded webview contexts
- The sticky header would pin beneath the native chrome on scroll without a matching safe area offset

This commit:

- Adds viewport-fit=cover to the viewport meta tag to unlock safe area inset values on iOS and Android
- Adds padding-top: env(safe-area-inset-top) to body to keep content below the status bar on page load
- Updates the sticky header's top offset to env(safe-area-inset-top) so it remains visible below the notch when scrolling

Closes #FXA-13203
@vpomerleau vpomerleau requested a review from a team as a code owner March 4, 2026 22:52
Copy link
Copy Markdown
Contributor

@vbudhram vbudhram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test this on a device but seems low risk.

data-testid="header"
role="banner"
className={props.className || 'sticky top-0 bg-grey-10 z-10'}
// top-[env(safe-area-inset-top)] keeps the sticky header below the notch/status bar on scroll
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was tricky to test, this seemed to only be an issue for VPN. We'll probably have to test on stage to confirm it works.

@vpomerleau vpomerleau merged commit cf91efa into main Mar 9, 2026
22 checks passed
@vpomerleau vpomerleau deleted the FXA-13203 branch March 9, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants