Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev
This commit is contained in:
@@ -201,7 +201,15 @@ export const TerminalComponent: React.FC<TerminalProps> = ({
|
||||
term.loadAddon(fitAddon);
|
||||
term.loadAddon(new WebLinksAddon());
|
||||
|
||||
term.open(terminalRef.current);
|
||||
// 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);
|
||||
|
||||
// Connect WebSocket
|
||||
const ws = connectWebSocket();
|
||||
|
||||
Reference in New Issue
Block a user