Skip to content

fix(engine): an open sheet holds the page still, so a swipe on it never scrolls the page behind - #91

Merged
KennethWKZ merged 1 commit into
mainfrom
fix/sheet-holds-page
Nov 25, 2026
Merged

KennethWKZ merged 1 commit into
mainfrom
fix/sheet-holds-page

Conversation

@KennethWKZ

Copy link
Copy Markdown
Owner

What

On an iPhone, a swipe on a sheet that is shorter than the screen scrolled the page behind it instead. Seen on Food near me (Breakfast, which lists fewer places than Lunch or Dinner) and on a place's Info sheet. A taller sheet scrolled itself, which hid the problem.

Why it happened

A modal dialog stops taps reaching the page, not scrolling. A short sheet has nothing of its own to scroll, so the swipe went through to the page, and overscroll-behavior: contain does nothing on an element that can't scroll.

Change

  • engine/src/style.css: while any dialog.sheet is open, html and body are overflow: hidden, with scrollbar-gutter: stable so desktop doesn't shift sideways. Sheets also get overscroll-behavior: contain. Covers every sheet: Food near me, Info and the place sheet, Sections, Days, block sheets, the driver card, Copy.
  • tests/e2e/navigation.spec.mjs: a swipe on an open sheet (Food near me, and the place sheet) never scrolls the page behind it, and the page is where it was and scrolls again once the sheet closes.
  • knowledge/engine-browser.md: the lesson.

Tests

  • New test: fails without the fix, passes with it on android-390, chromium-1280, webkit-390 and webkit-1280.
  • Specs that use sheets (navigation, keyboard, add-stop, bottom-bar, location, sync, place-finder, map-search) on android-390 and webkit-390: 194 passed, 2 skipped by their own condition.
  • pnpm verify green.
  • Playwright can't swipe, so the test uses the wheel plus the held page. Still to check by hand on a real iPhone.

…er scrolls the page behind

A sheet shorter than the screen has nothing of its own to scroll, so on an iPhone a swipe on it went
through to the page (Food near me on Breakfast, a place's Info). While any sheet is open the page is
overflow hidden, with a stable scrollbar gutter; it keeps its place and scrolls again on close.
@KennethWKZ
KennethWKZ merged commit 51e11ea into main Nov 25, 2026
12 checks passed
@KennethWKZ
KennethWKZ deleted the fix/sheet-holds-page branch November 25, 2026 01:01
@github-actions github-actions Bot mentioned this pull request Nov 25, 2026
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.

1 participant