Skip to content

fix(nav): Keep the mobile top bar height when the menu is open - #130887

Merged
priscilawebdev merged 1 commit into
masterfrom
fix/mobile-nav-top-bar-height
Nov 12, 2026
Merged

priscilawebdev merged 1 commit into
masterfrom
fix/mobile-nav-top-bar-height

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Fixes DE-1846. Reported by @natemoo-re.

On mobile, opening the menu could squeeze the page TopBar from 49px down to 33px, which pushed the page content up.

Root cause: MobileNavigation locked scrolling on #main when #main already existed at mount time (for example after you resize into the mobile layout, which is how the bug video was recorded). On a fresh mobile load it locked the body instead. When Seer Explorer is on, #main sits inside the bounded, scrolling content pane. The lock sets overflow: hidden on #main, which drops its flex min-height to 0. #main then shrinks to the pane height, and its children shrink too. The TopBar has a fixed height but the default flex-shrink: 1, so it ends up at the height of its contents. This isn't the earlier fixed-height cleanup in #127759 coming back. The lock target is a separate cause.

Fix: always lock document.body. That's what the fresh-load path already did, and it's the element that actually scrolls when the Seer pane is off.

Verified on a local devserver at 760px wide, with Seer Explorer forced on locally. Before the fix, resizing from desktop width and opening the menu gave a 33px TopBar. After the fix it stays at 49px. I checked both the resize path and a fresh load, with Seer on and off, and the scroll position is the same after closing the menu. index.mobile.spec.tsx and topBar.spec.tsx pass, along with lint and typecheck.

Not in this PR: showing the current project in the mobile settings breadcrumb. That's still an open design decision.

via @priscilawebdev.

--

View Session [Sentry]

The mobile menu locked scrolling on #main whenever #main existed when
the menu mounted (for example after resizing into the mobile layout).
Setting `overflow: hidden` on #main drops its flex min-height to 0, so
inside the Seer Explorer content pane it shrinks to the pane height and
the TopBar is squeezed from 49px to its 33px content height.

Always lock the document body instead, which is what a fresh mobile
load already did.

Fixes DE-1846

Co-Authored-By: Priscila Andre de Oliveira <29228205+priscilawebdev@users.noreply.github.com>
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 12, 2026 09:31
@linear-code

linear-code Bot commented Nov 12, 2026

Copy link
Copy Markdown

DE-1846

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 12, 2026
@priscilawebdev
priscilawebdev merged commit d2b322d into master Nov 12, 2026
78 checks passed
@priscilawebdev
priscilawebdev deleted the fix/mobile-nav-top-bar-height branch November 12, 2026 09:41

This branch was successfully deployed

1 active deployment
Preview — 30501a95 Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants