fix: mobile terminal scroll in both normal mode and tmux

- Dual-mode touch scroll:
  - Normal mode: scroll .xterm-viewport directly when scrollHeight > clientHeight
  - Alternate screen (tmux/vim): send SGR 1006 mouse-wheel protocol data
    using cursor position so tmux knows which pane to scroll
- Add touch-action: none to .terminal-container to prevent browser gestures
- Lock both html and body overflow when terminal page is open on mobile
- Remove synthetic WheelEvent approach (xterm.js SmoothScrollableElement
  doesn't reliably handle synthetic events)
This commit is contained in:
Alex Blank
2026-05-29 20:35:28 +02:00
parent 98b9d612fa
commit 4814ec2363
3 changed files with 34 additions and 8 deletions
+2
View File
@@ -77,6 +77,7 @@ body {
color: var(--ink);
}
html.terminal-page-open,
body.terminal-page-open {
overflow: hidden;
}
@@ -3707,6 +3708,7 @@ a.nav-item,
padding: 0;
overflow: hidden;
position: relative;
touch-action: none;
}
/* xterm.js manages its own sizing */