Keep the application's focus in step with arrow-key moves in forms
Form.SetFocus moves between items without telling the application, which kept the item that was left. Opening the help from the Config view then blurred only that one: the field in use kept drawing its cursor through the help window, the form still had the focus and took the help's keys (no scrolling), and closing the help returned to the wrong field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019reK4DUGYqDUjniWYJvwUW
This commit is contained in:
@@ -200,6 +200,7 @@ func New(cfg *config.Config) *App {
|
||||
return false
|
||||
})
|
||||
a.app.SetRoot(&toastRoot{Flex: layout, app: a}, true).EnableMouse(false)
|
||||
syncFocus = func(p tview.Primitive) { a.app.SetFocus(p) }
|
||||
a.app.SetInputCapture(a.handleKey)
|
||||
a.switchTo(0)
|
||||
a.renderServices()
|
||||
|
||||
Reference in New Issue
Block a user