mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 08:59:40 +02:00
fix: restore mobile terminal scrollback — use JS scrollLines() instead of broken native scroll
xterm.js DOM renderer doesn't populate .xterm-viewport's scroll area (the div is empty, scrollHeight === clientHeight), so native CSS scrolling via touch-action:pan-y and overflow-y:scroll had nothing to scroll. Desktop worked only because the wheel handler called terminal.scrollLines() directly. - Replace split mobile/desktop touch handlers with unified JS-driven handler that converts touch deltas to terminal.scrollLines() calls (with pixel accumulation for slow swipes and momentum scrolling) - Change touch-action from pan-y to none on terminal elements so browser doesn't fight the JS handler - Remove now-unnecessary xterm-viewport position/overflow/z-index overrides and iOS -webkit-overflow-scrolling rules - Fix _shrinkPaddingToFit() arithmetic (was adding gap instead of subtracting) - Minor: add route-helpers.ts to CLAUDE.md, fix sse-events.ts comment count Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -446,7 +446,7 @@ const KeyboardHandler = {
|
||||
const gap = container.clientHeight - app.terminal.rows * cellH;
|
||||
if (gap > 0 && gap < cellH) {
|
||||
const currentPadding = parseInt(main.style.paddingBottom) || 0;
|
||||
main.style.paddingBottom = currentPadding + gap + 'px';
|
||||
main.style.paddingBottom = Math.max(0, currentPadding - gap) + 'px';
|
||||
if (app.fitAddon)
|
||||
try {
|
||||
app.fitAddon.fit();
|
||||
|
||||
Reference in New Issue
Block a user