From 9bd439ccb466d84a9f70dba6bea4a491e463caa6 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Tue, 23 Jun 2026 10:34:32 -0700 Subject: [PATCH] Remove textContentType none from iOS terminal input (#6176) - iOS `textContentType` overrides `autoComplete` and restricts keyboard layouts, preventing switching to non-Latin input methods (IMEs). - Use `autoComplete="off"` instead to ensure the keyboard remains default and IME switching stays available. - Update tests to assert these changes. --- mobile/app/h/[hostId]/session/[worktreeId].tsx | 7 ++++++- mobile/src/terminal/terminal-ios-ime-keyboard.test.ts | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mobile/app/h/[hostId]/session/[worktreeId].tsx b/mobile/app/h/[hostId]/session/[worktreeId].tsx index 7be0e3894..542dbf53a 100644 --- a/mobile/app/h/[hostId]/session/[worktreeId].tsx +++ b/mobile/app/h/[hostId]/session/[worktreeId].tsx @@ -4915,12 +4915,14 @@ export default function SessionScreen() { autoCorrect={false} spellCheck={false} smartInsertDelete={false} + // Why: iOS textContentType wins over autoComplete and can + // narrow the keyboard surface; keep IME switching available. + autoComplete="off" keyboardType={getTerminalLiveInputKeyboardType(Platform.OS)} returnKeyType="default" blurOnSubmit={false} editable={canSend} importantForAutofill="no" - textContentType="none" /> ) : ( @@ -4946,6 +4948,9 @@ export default function SessionScreen() { autoCorrect={autocompleteEnabled} spellCheck={autocompleteEnabled} smartInsertDelete={false} + // Why: terminal commands are not autofill content, but the + // keyboard must stay default so non-Latin IMEs remain selectable. + autoComplete="off" keyboardType={getTerminalCommandKeyboardType( Platform.OS, autocompleteEnabled diff --git a/mobile/src/terminal/terminal-ios-ime-keyboard.test.ts b/mobile/src/terminal/terminal-ios-ime-keyboard.test.ts index 412e9db66..ac6ee0ff9 100644 --- a/mobile/src/terminal/terminal-ios-ime-keyboard.test.ts +++ b/mobile/src/terminal/terminal-ios-ime-keyboard.test.ts @@ -11,4 +11,9 @@ describe('terminal iOS IME keyboard', () => { expect(sessionRouteSource).not.toContain("'ascii-capable'") expect(sessionRouteSource).not.toContain('"ascii-capable"') }) + + it('does not put terminal keyboard capture behind iOS textContentType semantics', () => { + expect(sessionRouteSource).not.toContain('textContentType="none"') + expect(sessionRouteSource).toContain('autoComplete="off"') + }) })