[BUG] Desktop: first click on an unfocused mod Pane only focuses it; Button onPress does not fire
Status Open
Reported on v2.1.293
Maintainer reply None cached
Activity 1 comment · opened Oct 10, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
On the desktop surface, clicking a Button in a mod Pane that does not have focus only moves focus to the pane. onPress does not fire, so a second click is needed. Once the pane has focus, clicks press normally (after the mod keeps the focus ring on the pressed control with $.ui.focus).
What Should Happen?
The first click on a Button in an unfocused Pane should fire ui.press / onPress, the same as a click on a focused Pane.
Error Messages/Logs
No error. With `ui.press` and `ui.render` hooks logging every event, the first click on an unfocused pane
produces only a re-render of the Pane with isFocused=true and no ui.press. The next click produces ui.press.
Steps to Reproduce
- Load a mod that opens a Pane (
$.ui.open({ id, title })) and draws aButtonwith anonPresshandler in itsui.renderhook. - In the Claude desktop app (Code tab), open the Pane.
- Click in the prompt box so the Pane loses focus.
- Click the Button once.
onPressdoes not fire; the Pane only gains focus. - Click the Button again.
onPressfires.
Claude Model
Opus
Is this a regression?
I don't know
Claude Code Version
2.1.293 (Claude Code), Claude desktop app 2.26454.2
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other (Claude desktop app, Code tab)
Additional Information
Related mod/desktop issues: #99217, #99449.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗