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 <bashrusakh@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
co-authored by
bashrusakh
parent
0e47b388d5
commit
200c02cd00
@@ -1140,7 +1140,7 @@ export const TerminalView: React.FC<TerminalViewProps> = ({ visible }) => {
|
||||
fontFamily={resolvedFontStack}
|
||||
fontSize={terminalFontSize}
|
||||
enableTouchScroll={useTouchTerminalInput}
|
||||
autoFocus={!useTouchTerminalInput && isTerminalVisible}
|
||||
autoFocus={isTerminalVisible}
|
||||
isVisible={isTerminalVisible}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user