Repository navigation
fix(engine): an open sheet holds the page still, so a swipe on it never scrolls the page behind - #91
Merged
Merged
Conversation
…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.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: containdoes nothing on an element that can't scroll.Change
engine/src/style.css: while anydialog.sheetis open,htmlandbodyareoverflow: hidden, withscrollbar-gutter: stableso desktop doesn't shift sideways. Sheets also getoverscroll-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
pnpm verifygreen.