Desktop app: mod Pane Buttons need two clicks when the pane isn't focused (first click dropped with `ui_press not handled`)
Summary
In the desktop app (Code tab), a mod's Pane Buttons need two clicks when the pane isn't focused. The first click only focuses the pane and is dropped; the second click works.
Steps to reproduce
- Load a mod that opens a
Pane($.ui.open({ id, title, focus: true })) and draws plainButtons with ordinaryonPressclosures from aui.renderhook. - Click somewhere outside the pane (e.g. the prompt), so the pane loses focus.
- Click a Button in the pane.
Expected: the click presses the Button.
Actual: nothing happens. Clicking the same Button again works.
What the logs show
Each dropped click logs this in ~/Library/Logs/Claude/claude.ai-web.log:
[warn] [LOCAL_SESSION] engine surface: ui_press not handled {"plugin":"<mod>","handle":<n>,"key":"<button key>"}
No ui.press hook in the mod is raised for the dropped click. It looks like focusing the pane changes its props (isFocused), the engine redraws it with new press handles, and the click is then sent with the previous drawing's handle.
Drawing the Buttons inside a Client surface module avoids the dropped click, but loses the native button look and the hover styling.
Related: no pointer cursor
Plain (plain) mod Buttons in a Pane show the default arrow cursor on hover in the desktop app, not cursor: pointer, so they don't look clickable. A mod has no way to set the cursor.
Environment
- Claude desktop app 2.31226.1 (macOS 26.4)
- Claude Code 2.1.283
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗