fix: Ctrl+F is not working when Welcome page is not focused (#398)

This commit is contained in:
leo 2024-08-23 17:05:13 +08:00
parent c76d521f12
commit e845c270cd
No known key found for this signature in database
2 changed files with 14 additions and 7 deletions

View file

@ -45,13 +45,6 @@ namespace SourceGit.Views
TreeContainer.Focus(NavigationMethod.Directional);
e.Handled = true;
}
else if (e.Key == Key.F &&
((OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Meta)) ||
(!OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Control))))
{
SearchBox.Focus();
e.Handled = true;
}
else if (e.Key == Key.Escape)
{
ViewModels.Welcome.Instance.ClearSearchFilter();