From ce4c5ae99f6993590aa36063d3c8cbd357d4d211 Mon Sep 17 00:00:00 2001 From: Junlang Huang <37657807+Dav1dch@users.noreply.github.com> Date: Thu, 7 May 2026 00:30:43 +0800 Subject: [PATCH] fix: redirect focus to hidden input after blurring Ghostty elements (#1122) On Android tablets in Desktop site mode, the handleDocumentFocusIn handler intercepted Ghostty's internal element focus and blurred them, but never redirected focus to the hidden input overlay. This left the terminal with no focused element - the IME keyboard would appear but keystrokes went nowhere. Now focusHiddenInput() is called after the blur to ensure the terminal always has a focused input surface. --- packages/ui/src/components/terminal/TerminalViewport.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ui/src/components/terminal/TerminalViewport.tsx b/packages/ui/src/components/terminal/TerminalViewport.tsx index dcacdff1..f2db2587 100644 --- a/packages/ui/src/components/terminal/TerminalViewport.tsx +++ b/packages/ui/src/components/terminal/TerminalViewport.tsx @@ -1000,6 +1000,7 @@ const TerminalViewport = React.forwardRef { target.blur(); + focusHiddenInput(); }, 0); setTerminalCursorBlink(false); return;