Browse Source

Fixes #3847. TabView changes focus to Tab on Layout.

BDisp 8 months ago
parent
commit
684fb199ed

+ 0 - 5
Terminal.Gui/Views/TabView/TabRowView.cs

@@ -64,11 +64,6 @@ internal class TabRowView : View
             return false;
             return false;
         }
         }
 
 
-        if (!HasFocus && CanFocus)
-        {
-            SetFocus ();
-        }
-
         if (me.IsSingleDoubleOrTripleClicked)
         if (me.IsSingleDoubleOrTripleClicked)
         {
         {
             var scrollIndicatorHit = 0;
             var scrollIndicatorHit = 0;

+ 4 - 0
Terminal.Gui/Views/TabView/TabView.cs

@@ -518,6 +518,10 @@ public class TabView : View
         {
         {
             SelectedTab?.SetFocus ();
             SelectedTab?.SetFocus ();
         }
         }
+        else
+        {
+            SelectedTab?.View?.SetFocus ();
+        }
     }
     }
 
 
     /// <summary>
     /// <summary>