[BUG] Mods: a click on a pane Button leaves the keys with the prompt, so a field it opens can't take them while the prompt has text

Status Open
Reported on v2.1.296
Maintainer reply None cached
Activity 0 comments · opened Oct 14, 2026

What happens

In the terminal, a click on a mod pane's Button presses it, but the keys stay with the prompt. A click on empty space in the pane also leaves them there. A click on an Input does give it the keys.

So a press that opens a text field can give the field the keys only through $.ui.open({ id, focus: true }) and then $.ui.focus. While the prompt has text, open({ focus }) is refused, as its types say. The field draws, but the letters the person types next go into the prompt.

Expected

The Button.hotkey types say a site holds the keys "after ctrl+x tab, a click or open({ focus })". So a click in the pane should give the pane the keys. Then $.ui.focus could move them to the field the press opened.

Repro

  1. Draw a pane with a Button whose onPress draws an Input with autoFocus, then calls $.ui.open({ id, focus: true }) and $.ui.focus({ requestId: id, key: <the Input's key> }).
  2. Type some text in the prompt.
  3. Click the Button.
  4. Type a few letters. They go to the prompt, not to the field.

With an empty prompt, the same steps work, because open({ focus }) is granted.

Environment

  • Claude Code 2.1.296, 2.1.299 and 2.1.300 on macOS.
  • Fullscreen renderer ("tui": "fullscreen" or CLAUDE_CODE_NO_FLICKER=1).
  • The pane both docked (150 columns) and inline (100 columns).
  • Clicks sent as SGR mouse events in tmux.

Related

#100966 is the desktop app's version: there a pane Input never gets the keys.

_Written by Claude_

View original on GitHub ↗