Terminal.Gui icon indicating copy to clipboard operation
Terminal.Gui copied to clipboard

Views must not blindly return `true` from `Command` functions

Open tig opened this issue 6 months ago • 0 comments

I discovered this as I've beefed up how keyboard nav works in #3627.

Examples:

  • ListView - blindly returns true from MoveUp/MoveDown even if the selection was not changed (e.g. MoveUp when at the top of the list). As a result, pressing Up when at the top of the list does not allow keyboard nav to change focus to the "previous view".
  • TableView - blindly returns true from all relevant Command handlers. No arrow keys work to move to next/prev view. In addition, TableView always return true from the Command.Accept handler. This prevents the default button in a Dialog from working when a TableView is used.

I will be adding an all-views test in #3627 that highlights any view that behaves improperly here...

tig avatar Jul 31 '24 12:07 tig