fix: lock body scroll and re-add programmatic terminal touch scroll

- Add body.terminal-page-open { overflow: hidden } to prevent page scroll
- TerminalPage adds/removes 'terminal-page-open' class on body when mounted
- Re-add capture-phase touch listeners in terminal.tsx with low 3px threshold
- Call e.preventDefault() immediately when vertical gesture is detected,
  before browser compositor commits to page scroll
- Remove CSS touch-action overrides on xterm viewport (now handled in JS)
- Scroll forwarded via term.scrollLines() with 24px per line sensitivity
This commit is contained in:
Alex Blank
2026-05-29 19:57:48 +02:00
parent 61d32fa00f
commit c1e16f2163
3 changed files with 91 additions and 19 deletions
+4 -8
View File
@@ -77,6 +77,10 @@ body {
color: var(--ink);
}
body.terminal-page-open {
overflow: hidden;
}
[data-theme="dark"] body {
background: radial-gradient(circle at top right, #2a2520, var(--bg));
}
@@ -3709,14 +3713,6 @@ 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;