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:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user