From 200c02cd00894812435b6883916bdde19577cab1 Mon Sep 17 00:00:00 2001 From: Leonid <127580858+bashrusakh@users.noreply.github.com> Date: Tue, 21 Jul 2026 17:45:54 +1100 Subject: [PATCH] fix(terminal): auto-focus hidden input overlay on mobile web (#2319) (#2329) On mobile web/PWA, useTouchTerminalInput is true, which gated the autoFocus prop behind !useTouchTerminalInput, causing autoFocus to be false and the hidden input overlay to never receive focus. The user had to manually tap the terminal to trigger focus. Remove the !useTouchTerminalInput condition so autoFocus works on mobile the same way it does on desktop: when the terminal becomes visible, focusTerminalInput() -> focusHiddenInput() is called, positioning and focusing the hidden textarea/input portal that captures virtual keyboard events. Co-authored-by: bashrusakh --- packages/ui/src/components/views/TerminalView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/components/views/TerminalView.tsx b/packages/ui/src/components/views/TerminalView.tsx index 72acf278..772faeb8 100644 --- a/packages/ui/src/components/views/TerminalView.tsx +++ b/packages/ui/src/components/views/TerminalView.tsx @@ -1140,7 +1140,7 @@ export const TerminalView: React.FC = ({ visible }) => { fontFamily={resolvedFontStack} fontSize={terminalFontSize} enableTouchScroll={useTouchTerminalInput} - autoFocus={!useTouchTerminalInput && isTerminalVisible} + autoFocus={isTerminalVisible} isVisible={isTerminalVisible} /> ) : null}