diff --git a/src/components/terminal/TerminalView.vue b/src/components/terminal/TerminalView.vue index c3a2ebd..56e9130 100644 --- a/src/components/terminal/TerminalView.vue +++ b/src/components/terminal/TerminalView.vue @@ -49,6 +49,7 @@
@@ -136,9 +137,15 @@ onMounted(() => { terminal.onResize(({ cols, rows }) => { sessionStore.setTerminalDimensions(props.sessionId, cols, rows); }); + + // Focus the terminal after mount so keyboard input works immediately + setTimeout(() => { + fit(); + terminal.focus(); + }, 50); }); -// Re-fit and focus terminal when this tab becomes active +// Re-fit and focus terminal when switching back to this tab watch( () => props.isActive, (active) => {