Skip to content

Commit 684fb19

Browse files
committed
Fixes #3847. TabView changes focus to Tab on Layout.
1 parent 2a30e9e commit 684fb19

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Terminal.Gui/Views/TabView/TabRowView.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ protected override bool OnMouseEvent (MouseEventArgs me)
6464
return false;
6565
}
6666

67-
if (!HasFocus && CanFocus)
68-
{
69-
SetFocus ();
70-
}
71-
7267
if (me.IsSingleDoubleOrTripleClicked)
7368
{
7469
var scrollIndicatorHit = 0;

Terminal.Gui/Views/TabView/TabView.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,10 @@ internal IEnumerable<Tab> CalculateViewport (Rectangle bounds)
518518
{
519519
SelectedTab?.SetFocus ();
520520
}
521+
else
522+
{
523+
SelectedTab?.View?.SetFocus ();
524+
}
521525
}
522526

523527
/// <summary>

0 commit comments

Comments
 (0)