Skip to content

Commit

Permalink
Fixes #3847. TabView changes focus to Tab on Layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
BDisp committed Nov 24, 2024
1 parent 2a30e9e commit 684fb19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Terminal.Gui/Views/TabView/TabRowView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ protected override bool OnMouseEvent (MouseEventArgs me)
return false;
}

if (!HasFocus && CanFocus)
{
SetFocus ();
}

if (me.IsSingleDoubleOrTripleClicked)
{
var scrollIndicatorHit = 0;
Expand Down
4 changes: 4 additions & 0 deletions Terminal.Gui/Views/TabView/TabView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,10 @@ internal IEnumerable<Tab> CalculateViewport (Rectangle bounds)
{
SelectedTab?.SetFocus ();
}
else
{
SelectedTab?.View?.SetFocus ();
}
}

/// <summary>
Expand Down

0 comments on commit 684fb19

Please sign in to comment.