Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Files.App.Controls/Omnibar/Omnibar.Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ private void AutoSuggestBox_LostFocus(object sender, RoutedEventArgs e)

IsFocused = false;
IsFocusedChanged?.Invoke(this, new(IsFocused));

// Workaround to prevent an issue where if the window loses focus and then regains focus,
// the AutoSuggestBox will regain focus and the suggestions popup will open again.
if (element is TextBox)
{
_previouslyFocusedElement.TryGetTarget(out var previouslyFocusedElement);
previouslyFocusedElement?.Focus(FocusState.Programmatic);
}
}

private async void AutoSuggestBox_KeyDown(object sender, KeyRoutedEventArgs e)
Expand Down
Loading