Browse Source

Only set hasFocus to true if it's false.

BDisp 2 years ago
parent
commit
9ca23e5c4a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Terminal.Gui/Core/View.cs

+ 3 - 1
Terminal.Gui/Core/View.cs

@@ -1677,7 +1677,9 @@ namespace Terminal.Gui {
 			if (focused?.hasFocus == true && focused == view)
 				return;
 			if (focused?.hasFocus == true && focused?.SuperView == view) {
-				view.hasFocus = true;
+				if (!view.hasFocus) {
+					view.hasFocus = true;
+				}
 				return;
 			}
 			// Make sure that this view is a subview