浏览代码

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

BDisp 4 年之前
父节点
当前提交
f7a8cf63d7
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Terminal.Gui/Core/Toplevel.cs

+ 2 - 2
Terminal.Gui/Core/Toplevel.cs

@@ -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: