Discovered serious issues with how HasFocus, OnEnter/OnLeave, etc... work in some edge cases.

This will require re-visiting the design at a deep level and fixing some long-standing but ignored issues such as how OnEnter/OnLeave don't follow proper cancelation design. Also, there's a need for keeping track of the old focus state of a tree of subviews when that tree loses focus; FocusDireciton is a hack that causes tons of confusion.
This commit is contained in:
Tig
2024-08-01 06:08:48 -06:00
parent 469b3572d5
commit 4226d8172e
20 changed files with 277 additions and 136 deletions

View File

@@ -616,7 +616,7 @@ public class TableViewTests (ITestOutputHelper output)
top.Add (tableView);
Application.Begin (top);
top.FocusFirst (null);
top.FocusDeepest (null, NavigationDirection.Forward);
Assert.True (tableView.HasFocus);
Assert.Equal (0, tableView.RowOffset);
@@ -1606,7 +1606,7 @@ public class TableViewTests (ITestOutputHelper output)
top.Add (tv);
Application.Begin (top);
top.FocusFirst (null);
top.FocusDeepest (null, NavigationDirection.Forward);
Assert.True (tv.HasFocus);
// already on fish