We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf26c08 commit 6e1400fCopy full SHA for 6e1400f
1 file changed
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
@@ -442,8 +442,15 @@ export function Prompt(props: PromptProps) {
442
})
443
444
createEffect(() => {
445
- if (props.visible !== false) input?.focus()
446
- if (props.visible === false) input?.blur()
+ if (!input || input.isDestroyed) return
+ if (props.visible === false || dialog.stack.length > 0) {
447
+ input.blur()
448
+ return
449
+ }
450
+
451
+ // Slot/plugin updates can remount the background prompt while a dialog is open.
452
+ // Keep focus with the dialog and let the prompt reclaim it after the dialog closes.
453
+ input.focus()
454
455
456
0 commit comments