fix: terminal sizing and container overflow

- Change .terminal-wrapper.mobile from height:100% to flex:1 for proper flex behavior
- Add explicit width/height to xterm-viewport and xterm-screen to prevent overflow
- Add delayed fit() at 4s to resize after mobile header auto-hides
- Remove min-height:100% which caused overflow issues
This commit is contained in:
Fusion
2026-05-24 14:05:23 +02:00
parent 45cd192188
commit f065e2b8c0
2 changed files with 28 additions and 2 deletions
+15
View File
@@ -185,6 +185,21 @@ export const TerminalComponent: React.FC<TerminalProps> = ({
);
}
}, 500);
// Fit after mobile header auto-hides (3s delay + 0.3s transition)
setTimeout(() => {
fitAddon.fit();
const { cols, rows } = term;
if (ws.readyState === WebSocket.OPEN) {
ws.send(
JSON.stringify({
type: "resize",
cols,
rows,
})
);
}
}, 4000);
});
});