Since FocusNearestView method deals with navigation and focus is better use TabIndexes instead.

This commit is contained in:
BDisp
2021-01-12 00:18:16 +00:00
parent 845b940078
commit f7a8cf63d7

View File

@@ -221,7 +221,7 @@ namespace Terminal.Gui {
old?.SetNeedsDisplay ();
Focused?.SetNeedsDisplay ();
} else {
FocusNearestView (SuperView?.Subviews, Direction.Forward);
FocusNearestView (SuperView?.TabIndexes, Direction.Forward);
}
return true;
case Key.BackTab | Key.ShiftMask:
@@ -234,7 +234,7 @@ namespace Terminal.Gui {
old?.SetNeedsDisplay ();
Focused?.SetNeedsDisplay ();
} else {
FocusNearestView (SuperView?.Subviews?.Reverse(), Direction.Backward);
FocusNearestView (SuperView?.TabIndexes?.Reverse(), Direction.Backward);
}
return true;
case Key.Tab | Key.CtrlMask: