Skip to content

Code Quality: Fixed selecting Omnibar suggestions via keyboard #17260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
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: 3 additions & 5 deletions src/Files.App.Controls/Omnibar/Omnibar.Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,12 @@ private void AutoSuggestBox_TextChanged(object sender, TextChangedEventArgs e)

// UpdateSuggestionListView();

if (_textChangeReason is not OmnibarTextChangeReason.SuggestionChosen and
not OmnibarTextChangeReason.ProgrammaticChange)
if (_textChangeReason is OmnibarTextChangeReason.ProgrammaticChange)
_textBox.SelectAll();
else
{
_textChangeReason = OmnibarTextChangeReason.UserInput;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this alright? When text is being changed, how it being changed would be still needed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's causing issues, do you remember why you added it?

_userInput = _textBox.Text;
}
else if (_textChangeReason is OmnibarTextChangeReason.ProgrammaticChange)
_textBox.SelectAll();

TextChanged?.Invoke(this, new(CurrentSelectedMode, _textChangeReason));

Expand Down
Loading