fix: enable native touch scrolling on xterm.js viewport for mobile

- Remove all custom touch event interception code from terminal.tsx
- After term.open(), find the internal .xterm-viewport element and set
  touchAction=pan-y and overscrollBehavior=contain via inline styles
- Add CSS targeting .xterm-viewport on mobile with touch-action: pan-y,
  -webkit-overflow-scrolling: touch, and overflow-y: auto
- Let the browser handle vertical touch panning natively instead of
  trying to intercept and manually forward events
This commit is contained in:
Alex Blank
2026-05-29 19:41:23 +02:00
parent cddb3f8ccf
commit 61d32fa00f
2 changed files with 19 additions and 91 deletions
+8
View File
@@ -3709,6 +3709,14 @@ a.nav-item,
/* xterm.js manages its own scrolling and viewport dimensions */
/* Mobile: enable native touch scrolling on xterm viewport */
.terminal-wrapper.mobile .xterm .xterm-viewport {
touch-action: pan-y !important;
-webkit-overflow-scrolling: touch !important;
overflow-y: auto !important;
scrollbar-width: none;
}
/* Special Keys Strip */
.special-keys-strip {
flex-shrink: 0;