diff options
| author | Maharshi Patel <[email protected]> | 2026-01-24 15:12:16 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-24 15:12:16 -0500 |
| commit | 8f99e9a606e0236648923ce36e84e579e3e496f8 (patch) | |
| tree | d8a381d2aac820485ec09af877a10b84eb9bcc51 | |
| parent | 27b45d070d927c6fd423f9eb0f8ad6a3a612336f (diff) | |
| download | opencode-8f99e9a606e0236648923ce36e84e579e3e496f8.tar.gz opencode-8f99e9a606e0236648923ce36e84e579e3e496f8.zip | |
fix(opentui): question selection click when terminal unfocused (#9731)
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/routes/session/question.tsx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/question.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/question.tsx index 464b7d0c4..88e99c6ea 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/question.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/question.tsx @@ -312,7 +312,11 @@ export function QuestionPrompt(props: { request: QuestionRequest }) { const active = () => i() === store.selected const picked = () => store.answers[store.tab]?.includes(opt.label) ?? false return ( - <box onMouseOver={() => moveTo(i())} onMouseUp={() => selectOption()}> + <box + onMouseOver={() => moveTo(i())} + onMouseDown={() => moveTo(i())} + onMouseUp={() => selectOption()} + > <box flexDirection="row"> <box backgroundColor={active() ? theme.backgroundElement : undefined} paddingRight={1}> <text fg={active() ? tint(theme.textMuted, theme.secondary, 0.6) : theme.textMuted}> @@ -337,7 +341,11 @@ export function QuestionPrompt(props: { request: QuestionRequest }) { }} </For> <Show when={custom()}> - <box onMouseOver={() => moveTo(options().length)} onMouseUp={() => selectOption()}> + <box + onMouseOver={() => moveTo(options().length)} + onMouseDown={() => moveTo(options().length)} + onMouseUp={() => selectOption()} + > <box flexDirection="row"> <box backgroundColor={other() ? theme.backgroundElement : undefined} paddingRight={1}> <text fg={other() ? tint(theme.textMuted, theme.secondary, 0.6) : theme.textMuted}> |
