Skip to content

fix(viewer): keep pull-to-refresh out of scroll regions - #118

Merged
code0xff merged 1 commit into
devfrom
fix/viewer-overscroll-refresh
Oct 25, 2026
Merged

code0xff merged 1 commit into
devfrom
fix/viewer-overscroll-refresh

Conversation

@code0xff

Copy link
Copy Markdown
Owner

Purpose

On a Galaxy Fold (Android Chrome / Samsung Internet), scrolling the viewer's content up to its top kept reloading the page: once a scroll region reached its top, the rest of the pull went to the document and triggered pull-to-refresh. iOS has no such gesture, so it only showed on Android.

Change

  • overscroll-behavior-y: contain on the scroll regions (.overflow-auto, .overflow-y-auto, .xterm-viewport), so it also covers regions added later.
  • The document itself is left alone: pulling on the header or another fixed bar still refreshes.
  • Docs: docs/web-viewer.md mobile paragraph.

Verification

  • npm test 936 passed, tsc -b ok, npm run build; the rule is present in the built CSS and baseline dist reproduces cleanly. Pre-push hook passed.
  • Not verified on a physical Android device; Playwright cannot emulate pull-to-refresh.
  • Local Node is 22.15, so builds ran with NODE_OPTIONS=--experimental-strip-types (the new check-deps.ts prebuild needs it; CI uses Node 26).

🤖 Generated with Claude Code

https://claude.ai/code/session_01K9Y6nr4J3kMp6GVQNUd9Ry

On Android, scrolling a list or a terminal up to its top handed the rest
of the gesture to the document, and the browser reloaded the viewer.
Scroll regions now contain vertical overscroll; fixed bars such as the
header still reach the document, so a deliberate pull still refreshes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9Y6nr4J3kMp6GVQNUd9Ry
@code0xff
code0xff merged commit d0c8877 into dev Oct 25, 2026
6 checks passed
@code0xff
code0xff deleted the fix/viewer-overscroll-refresh branch October 25, 2026 14:27
@whackur whackur mentioned this pull request Oct 28, 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