fix: terminal scroll — mobile touch + desktop auto-scroll - #44
Merged
Conversation
Mobile touch scrolling: - xterm.js v6 doesn't handle touch natively (canvas overlays viewport) - Added touch event handlers that translate gestures into scrollLines() - touch-action: none on container lets xterm handle all touch events - body overflow:hidden + overscroll-behavior:none prevents page scroll Desktop auto-scroll: - Track userScrolledUp via onScroll instead of per-message atBottom check - Once user scrolls up, auto-scroll stops until they scroll back to bottom - programmaticScroll flag prevents scrollToBottom() from flipping the flag - Reset userScrolledUp on WebSocket reconnect Hardening from review: - disposed guard on onScroll and onTouchMove handlers - lineHeight uses fontSize * lineHeight multiplier with <= 0 guard - scrollSensitivity: 3 for better touch responsiveness Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
terminal.scrollLines()calls.atBottomcheck (3-row threshold) withuserScrolledUpstate tracking. Auto-scroll stops when you scroll up, resumes when you scroll back to bottom.overflow: hidden+overscroll-behavior: noneon body prevents mobile page-level scrolling.Test plan
🤖 Generated with Claude Code