feat: touch scroll for terminal and sidebar on mobile

Terminal: add touchstart/touchmove/touchend IIFE on #terminal-container.
Vertical swipe delta translated to _term.scrollLines(n). touchmove is
non-passive (required for e.preventDefault to block page scroll while
swiping inside terminal). mouse wheel scroll unaffected (separate wheel
event path in xterm.js).

Sidebar: add touch-action:pan-y + overscroll-behavior:contain to
.sidebar-list. Tells browser explicitly that vertical panning is allowed
and prevents scroll chaining when reaching list ends.
This commit is contained in:
Brian Krabach
2026-03-28 14:37:57 -07:00
parent 4ffdc1bd99
commit 3d91bd5c68
4 changed files with 87 additions and 0 deletions
+2
View File
@@ -427,6 +427,8 @@ body {
display: flex;
flex-direction: column;
gap: 6px;
touch-action: pan-y; /* tell browser vertical panning is allowed on mobile */
overscroll-behavior: contain; /* prevent scroll chaining to non-scrollable parent */
}
.sidebar-collapse-btn {