Skip to content

Commit bfbcb5f

Browse files
committed
tui: prevent default Enter key behavior when selecting dialog options to avoid conflicts
1 parent 89492b3 commit bfbcb5f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
130130
if (evt.name === "return") {
131131
const option = selected()
132132
if (option) {
133+
evt.preventDefault()
133134
if (option.onSelect) option.onSelect(dialog)
134135
props.onSelect?.(option)
135136
}

0 commit comments

Comments
 (0)