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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user