fix: remove conflicting CSS that broke terminal sizing
- Remove second .terminal-wrapper.mobile definition that overrode position:absolute - Add flex display to .xterm for proper viewport filling - Add position:relative to mobile terminal-container - Remove manual dimension setting workaround from terminal.tsx - Root cause: CSS specificity conflict caused FitAddon to read height=0
This commit is contained in:
@@ -197,15 +197,7 @@ export const TerminalComponent: React.FC<TerminalProps> = ({
|
||||
term.loadAddon(fitAddon);
|
||||
term.loadAddon(new WebLinksAddon());
|
||||
|
||||
// Ensure container has explicit dimensions before xterm initializes
|
||||
const container = terminalRef.current;
|
||||
const parentRect = container.parentElement?.getBoundingClientRect();
|
||||
if (parentRect) {
|
||||
container.style.width = `${parentRect.width}px`;
|
||||
container.style.height = `${parentRect.height}px`;
|
||||
}
|
||||
|
||||
term.open(container);
|
||||
term.open(terminalRef.current);
|
||||
|
||||
// Connect WebSocket
|
||||
const ws = connectWebSocket();
|
||||
|
||||
Reference in New Issue
Block a user