mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
Fix search results navigation focus issue - conditional focus on primary links
Co-authored-by: yeelam-gordon <73506701+yeelam-gordon@users.noreply.github.com>
This commit is contained in:
@@ -71,7 +71,11 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PrimaryLinksControl.Focus(FocusState.Programmatic);
|
||||
// Only set focus to primary links if they exist and are visible
|
||||
if (PrimaryLinks?.Count > 0 && PrimaryLinksControl.Visibility == Visibility.Visible)
|
||||
{
|
||||
PrimaryLinksControl.Focus(FocusState.Programmatic);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user