Skip to content

fix: improve iOS terminal scroll speed#12

Open
ZacharyZcR wants to merge 1 commit into
Termix-SSH:mainfrom
ZacharyZcR:fix/ios-terminal-scroll-speed
Open

fix: improve iOS terminal scroll speed#12
ZacharyZcR wants to merge 1 commit into
Termix-SSH:mainfrom
ZacharyZcR:fix/ios-terminal-scroll-speed

Conversation

@ZacharyZcR
Copy link
Copy Markdown
Member

Summary

  • Fix slow terminal scrolling on iOS: iOS WebView does not generate wheel events from touch gestures, so xterm.js's built-in viewport scroll was limited to the native scroll behavior which only moves one line at a time. Added a touchmove listener that maps vertical swipe distance directly to terminal.scrollLines() for responsive, proportional scrolling.
  • Enable momentum scrolling: Added -webkit-overflow-scrolling: touch to the xterm viewport CSS for smoother inertial scrolling on iOS.

Files Changed

File Change
app/tabs/sessions/terminal/Terminal.tsx Add touch-scroll acceleration JS and viewport CSS fix

Test plan

  • Connect to a host on iOS
  • Produce output that extends beyond one screen (e.g. ls -la /usr/bin)
  • Swipe up/down — scrolling should be proportional to swipe distance, not one line at a time
  • Verify text selection (long press) still works correctly
  • Verify Android scrolling is not affected

Fixes Termix-SSH/Support#551

iOS WebView does not generate wheel events from touch gestures, so
xterm's built-in scroll was limited to the native viewport scroll which
moves only one line at a time. Add a touchmove listener that maps
vertical swipe distance to terminal.scrollLines() for responsive
scrolling, and enable -webkit-overflow-scrolling: touch on the viewport.

Fixes Termix-SSH/Support#551
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.

[BUG] Scrolling in the iOS app

1 participant