fix(mobile): app-feel pass — kill the website gestures#130
Merged
Conversation
…I text selection The PWA felt like a website on phones: the viewport rubber-banded past its edges, double-tap zoomed, long presses selected chrome text, and the h-screen shell overhung the visible area behind mobile browser toolbars, leaving the page itself pannable. - html/body: overscroll-behavior none (kills bounce + pull-to-refresh) and touch-action manipulation (kills double-tap zoom and its tap delay) - coarse-pointer only: user-select/touch-callout none on chrome; inputs, textareas and contenteditable opt back in. The EPUB reader renders in its own iframe, so highlight-by-selection is untouched; desktop is untouched. - app shells (AppShell, DashboardPage): h-screen -> h-dvh, main scrollers get overscroll-contain Verified computed styles on an emulated iPhone 13 viewport (and desktop unaffected); gesture feel needs a pass on the real phone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
The PWA felt like a website on phones (reported against Focus mode, but it applied app-wide): you could rubber-band the whole viewport past its edges, double-tap zoom, and long-press-select interface text — and the
h-screenshell overhung the visible area behind mobile browser toolbars, which made the page itself pannable.What
html/body:overscroll-behavior: none(no edge bounce, no scroll chaining, no Android pull-to-refresh) +touch-action: manipulation(no double-tap zoom, taps fire without the legacy delay).@media (pointer: coarse)):user-select: none+-webkit-touch-callout: noneon interface chrome;input/textarea/[contenteditable]opt back into text selection. Desktop behavior is completely unchanged.AppShell,DashboardPage):h-screen→h-dvhso the shell matches the visible viewport under mobile browser toolbars; main scrollers getoverscroll-contain.Notes
user-select: none.fixed inset-0, so it needed no dvh change.Verification
overscroll-behavior: none,touch-action: manipulation, chromeuser-select: nonewith inputs back totext,mainatcontain, dvh root exactly matchinginnerHeight); desktop context confirmed atuser-select: auto.npm run build(tsc) clean.Update (551dde1): a screen recording from the real device showed the actual headline symptom — the content area pans sideways and rubber-bands back. Root cause: WebKit counts the Focus rotary's pre-transform 540px stage as scrollable overflow (Chromium uses the post-transform size, which is why emulation initially missed it), giving the main scroller ~150px of horizontal scroll on a phone. Fixed by clamping the app's main scrollers with
overflow-x-hidden; verified on Playwright WebKit (iPhone 13 viewport) thatscrollLeftis pinned to 0.