mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-04 22:49:41 +02:00
fix: mobile keyboard layout — scroll-to-bottom on show, robust dismiss detection
Three bugs fixed in KeyboardHandler: 1. onKeyboardShow() used sessionData.terminal (always undefined) instead of app.terminal 2. Keyboard dismiss threshold (50px) too tight for iOS address bar drift — widened to 100px 3. No terminal refit on keyboard hide — caused black gap below terminal Also added: dynamic baseline update for initialViewportHeight, safety check in updateLayoutForKeyboard() that forces dismiss when keyboardOffset <= 0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+12
-11
@@ -8782,31 +8782,32 @@ kbd {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Mobile terminal - use native browser scrolling for smooth performance */
|
||||
/* Mobile terminal - native touch scrolling via xterm-viewport */
|
||||
.terminal-container {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
contain: layout style;
|
||||
touch-action: pan-y; /* Allow native vertical scrolling */
|
||||
overflow: visible; /* Must not be hidden — blocks touch scroll on viewport */
|
||||
touch-action: pan-y;
|
||||
}
|
||||
|
||||
.terminal-container .xterm {
|
||||
touch-action: pan-y;
|
||||
}
|
||||
|
||||
/* Viewport scroll optimization - use native scrolling */
|
||||
/* CRITICAL: xterm-viewport must be above xterm-screen for touch scrolling to work */
|
||||
/* See: https://github.com/xtermjs/xterm.js/issues/5377 */
|
||||
/* xterm-viewport is the scrollable element inside xterm.js.
|
||||
It must sit above xterm-screen to receive touch events.
|
||||
See: https://github.com/xtermjs/xterm.js/issues/5377 */
|
||||
.terminal-container .xterm-viewport {
|
||||
position: absolute !important;
|
||||
z-index: 10 !important; /* Above xterm-screen so touch events hit the scrollable viewport */
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
bottom: 0 !important;
|
||||
z-index: 10 !important;
|
||||
touch-action: pan-y;
|
||||
-webkit-overflow-scrolling: touch; /* Enable iOS momentum scrolling */
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-y: scroll !important;
|
||||
scroll-behavior: auto !important;
|
||||
will-change: scroll-position;
|
||||
}
|
||||
|
||||
.terminal-container .xterm-screen {
|
||||
|
||||
Reference in New Issue
Block a user