Skip to content

fix: an open phone menu scrolls, and the page behind it stays still - #99

Merged
ChristopherPHolder merged 1 commit into
mainfrom
fix/mobile-menu-scroll
Nov 28, 2026
Merged

ChristopherPHolder merged 1 commit into
mainfrom
fix/mobile-menu-scroll

Conversation

@ChristopherPHolder

Copy link
Copy Markdown
Collaborator

Closes #98.

What was wrong

  • Docs: the phone menu is a fixed panel between the header and the bottom of the screen. It kept align-self: start from the wide layout's sticky sidebar, and current Chrome applies align-self to fixed boxes. So the panel was as tall as its links (1100px on a 700px screen), started behind the header, and had nothing to scroll. The links below the fold couldn't be reached.
  • Movies: the drawer's list scrolled, but nothing held the page still while the drawer was open over it. At the end of the list, or on the drawer's logo or footer, a drag scrolled the page behind the drawer instead.

The fix

  • apps/docs/src/styles.css: below 900px the panel gets align-self: stretch, so it fills the space between its insets and scrolls.
  • apps/movies/src/styles.scss: below 1298px, where the drawer opens over the page, html:has(.side-drawer.opened) gets overflow: hidden. That matches what the docs do with html.menu-open.
  • apps/movies/src/app/app-shell/app-shell.component.scss: overscroll-behavior: contain on the drawer's list.

Checked

Headless Chrome with touch drags, against the local builds (vp preview):

  • Docs at 390 × 700: before, the panel was top: 0, 1100px tall, and a drag left scrollTop at 0. After, it is top: 56, 644px tall. A 300px drag up scrolls it to 301, back down to 99, and the page stays at 0. At 820 × 1000 it is 944px tall and scrolls. On a deep page the current link is in view. At 1440 the sidebar is still sticky.
  • Movies at 390 × 700: before, three drags at the end of the list, on the footer and on the logo moved the page 300, 600, then 900px. After, the page stays still, and it keeps its scroll position while the drawer is open. Once the drawer closes the page scrolls again. At 1440 nothing is locked. A genre link, the backdrop and the profile menu work as before.
  • vp check: 0 errors.

Docs: the phone menu, a fixed panel between the header and the bottom of
the screen, kept align-self: start from the wide layout's sticky sidebar.
Chrome now applies align-self to fixed boxes, so the panel was as tall as
its links, started behind the header and had nothing to scroll. It now
stretches between its insets.

Movies: while the drawer is open over the page, the page doesn't scroll,
and the drawer's list keeps its scroll at either end, so a drag on the
drawer no longer moves the page behind it.

Closes #98
@ChristopherPHolder
ChristopherPHolder merged commit 27a53f7 into main Nov 28, 2026
1 check passed
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.

Scrolling an open phone menu doesn't work

1 participant