diff --git a/src/Files.App/UserControls/StatusBarControl.xaml b/src/Files.App/UserControls/StatusBarControl.xaml index d496f878780cd..96193846ec348 100644 --- a/src/Files.App/UserControls/StatusBarControl.xaml +++ b/src/Files.App/UserControls/StatusBarControl.xaml @@ -61,11 +61,13 @@ BorderThickness="0" Content="{x:Bind DirectoryPropertiesViewModel.GitBranchDisplayName, Mode=OneWay}"> - + + Margin="-16" + LostFocus="BranchesGrid_LostFocus"> @@ -98,11 +100,9 @@ diff --git a/src/Files.App/UserControls/StatusBarControl.xaml.cs b/src/Files.App/UserControls/StatusBarControl.xaml.cs index 472fe82ea2e5f..7b668bb79274e 100644 --- a/src/Files.App/UserControls/StatusBarControl.xaml.cs +++ b/src/Files.App/UserControls/StatusBarControl.xaml.cs @@ -49,9 +49,9 @@ private void Flyout_Opening(object sender, object e) DirectoryPropertiesViewModel.SelectedBranchIndex = DirectoryPropertiesViewModel.ActiveBranchIndex; } - private void BranchesListView_ItemClick(object sender, ItemClickEventArgs e) + private void BranchesGrid_LostFocus(object sender, RoutedEventArgs e) { - GitBranchesFlyout.Hide(); + ((Popup)((FlyoutPresenter)((Grid)sender).Parent).Parent).IsOpen = false; } } }