Fix mobile WebView bottom row cutoff and one-finger scroll getting stuck

Subtract 1 row from measureFitDimensions to prevent the last terminal
line from being hidden behind the accessory bar overlay. Widen the
pinch-zoom snap-to-1 threshold from 1.05 to 1.15 so users don't get
trapped in pan mode after a slight zoom.

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo-H
2026-04-30 18:03:57 -04:00
co-authored by Orca
parent 83db85eb25
commit 92da053446
+6 -2
View File
@@ -309,7 +309,11 @@ const XTERM_HTML = `<!DOCTYPE html>
var vpWidth = window.innerWidth;
var vpHeight = window.innerHeight;
var cols = Math.floor(vpWidth / cellWidth);
var rows = Math.floor(vpHeight / cellHeight);
// Why: subtract 1 row so the bottom terminal line is never covered
// by the accessory bar. The WebView's innerHeight can slightly
// overstate the visible area due to layout timing or safe-area
// insets, causing the last row to render behind the overlay.
var rows = Math.max(8, Math.floor(vpHeight / cellHeight) - 1);
notify({ type: 'measure-result', cols: cols, rows: rows });
}
@@ -430,7 +434,7 @@ const XTERM_HTML = `<!DOCTYPE html>
if (ts.isPinching && e.touches.length < 2) {
ts.isPinching = false;
if (userScale < 1.05) {
if (userScale < 1.15) {
userScale = 1; panX = 0; panY = 0;
updateTransform();
}