Skip to content

fix: focus terminal on mobile app-mouse tap#152

Merged
gbasin merged 2 commits into
masterfrom
fix/mobile-appmouse-tap-keyboard
Jun 25, 2026
Merged

fix: focus terminal on mobile app-mouse tap#152
gbasin merged 2 commits into
masterfrom
fix/mobile-appmouse-tap-keyboard

Conversation

@gbasin

@gbasin gbasin commented Jun 25, 2026

Copy link
Copy Markdown
Owner

What

On iOS, in Claude Code fullscreen/app-mouse mode, a clean tap forwarded the SGR click to the app and returned early — so focusTerminalInput() never ran and the on-screen keyboard didn't activate. This focuses the xterm helper textarea on that tap path, keeping the focus tied to the live touchend user gesture (which iOS Safari requires) without double-sending a click to tmux/Claude.

Regression introduced by the app-mouse tap path added in #151.

Changes

  • src/client/components/Terminal.tsx: call focusTerminalInput() before preventDefault() in the sendTapClickToApp success branch.
  • src/client/__tests__/useTerminal.test.tsx: assert focusCalls === 1 on both the app-mouse tap path and the copy-mode tap path.

Verification

bun run lint && bun run typecheck && bun run test — all green locally (lint 0 errors, typecheck clean, 908 pass / 0 fail).

🤖 Generated with Claude Code

@gbasin gbasin merged commit dc152e3 into master Jun 25, 2026
5 checks passed
@gbasin gbasin deleted the fix/mobile-appmouse-tap-keyboard branch June 25, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant