Skip to content

Commit 3c162d2

Browse files
authored
Code Quality: Fixed selecting Omnibar suggestions via keyboard (#17260)
1 parent d1df7b9 commit 3c162d2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Files.App.Controls/Omnibar/Omnibar.Events.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,12 @@ private void AutoSuggestBox_TextChanged(object sender, TextChangedEventArgs e)
131131

132132
// UpdateSuggestionListView();
133133

134-
if (_textChangeReason is not OmnibarTextChangeReason.SuggestionChosen and
135-
not OmnibarTextChangeReason.ProgrammaticChange)
134+
if (_textChangeReason is OmnibarTextChangeReason.ProgrammaticChange)
135+
_textBox.SelectAll();
136+
else
136137
{
137-
_textChangeReason = OmnibarTextChangeReason.UserInput;
138138
_userInput = _textBox.Text;
139139
}
140-
else if (_textChangeReason is OmnibarTextChangeReason.ProgrammaticChange)
141-
_textBox.SelectAll();
142140

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

0 commit comments

Comments
 (0)