Make the mobile nav sheet swipe-to-close instead of fighting pull-to-refresh #13
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/mobile-nav-swipe-close"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
touch-action: noneon.mobileNavScrimand the new.sheetGrabberHandle- stops the browser's own default touch handling (pull-to-refresh included) from claiming a downward drag that starts on either.overscroll-behavior: containon.mobileNavSheet- stops a drag that hits the sheet's own scroll boundary (its library grid can be taller than the75vhcap) from chaining to the page underneath instead..sheetGrabber) is now a real drag handle, not just a visual hint:#sheetGrabberHandlewraps the small 36x4px pill in a proper touch target and drives the sheet with pointerdown/move/up(/cancel) - 1:1 tracking while dragging, snap back under a 90px threshold, close past it (reusing the exact samecloseMobileNav()the scrim tap already calls).Context
Reported directly against a real phone: the scrim tap was the only way to close the sheet, and the instinctive swipe-it-down gesture fell straight through to the browser's own pull-to-refresh instead. Deliberately scoped the drag gesture to the grabber handle alone, not the whole sheet - the sheet's own content (the library grid, the logout row) needs its normal taps/scroll to keep working, which a whole-sheet drag-to-close would fight.
Verification
typecheck/build(client only).touch-action/overscroll-behaviorconfirmed applied viagetComputedStyleagainst the real compiledapp.css.PointerEvents (realclientY/pointerId) against the real handlers copied fromShell.ts: a 40px drag snaps back (stays open), a 120px drag closes, and the livetransformmid-drag tracks the pointer 1:1 at an intermediate point (not just start/end).PointerEvent) - no device reachable from this sandbox, same standing gap as this project's other touch-drag work (the video/music seek bars).Test plan
🤖 Generated with Claude Code