huh
huh copied to clipboard
Preceding a confirm dialog with a spinner causes the first input keystroke to be ignored
Describe the bug As the title indicates, preceding a confirm dialog with a spinner causes the first input keystroke to be ignored.
To Reproduce
func main() {
spinnerErr := spinner.
New().
Title("retrieving data...").
Action(func() {
time.Sleep(1 * time.Second)
}).
Run()
if spinnerErr != nil {
log.Fatal(spinnerErr)
}
var confirmed bool
confirmErr := huh.NewConfirm().
Title("Fix?").
Value(&confirmed).
Run()
if confirmErr != nil {
log.Fatal(confirmErr)
}
}
Expected behavior first keystroke should be recognized
Desktop (please complete the following information):
- OS: [e.g. iOS] Windows
- Browser [e.g. chrome, safari] -
- Version [e.g. 22] v0.5.2