tui: prevent default Enter key behavior when selecting dialog options to avoid conflicts
Some checks are pending
deploy / deploy (push) Waiting to run
format / format (push) Waiting to run
snapshot / publish (push) Waiting to run
test / test (push) Waiting to run

This commit is contained in:
Dax Raad 2025-11-02 01:19:23 -05:00
parent 89492b3002
commit bfbcb5f200

View file

@ -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)
}