mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tui: prevent default Enter key behavior when selecting dialog options to avoid conflicts
This commit is contained in:
parent
89492b3002
commit
bfbcb5f200
1 changed files with 1 additions and 0 deletions
|
|
@ -130,6 +130,7 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
|
|||
if (evt.name === "return") {
|
||||
const option = selected()
|
||||
if (option) {
|
||||
evt.preventDefault()
|
||||
if (option.onSelect) option.onSelect(dialog)
|
||||
props.onSelect?.(option)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue