diff --git a/src/Files.App.Controls/Omnibar/Omnibar.cs b/src/Files.App.Controls/Omnibar/Omnibar.cs index 5806676b5688..5695ee810c5e 100644 --- a/src/Files.App.Controls/Omnibar/Omnibar.cs +++ b/src/Files.App.Controls/Omnibar/Omnibar.cs @@ -1,7 +1,6 @@ // Copyright (c) Files Community // Licensed under the MIT License. -using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Markup; using Microsoft.UI.Xaml.Media.Animation; using Windows.Foundation; @@ -246,7 +245,8 @@ internal protected void ChangeTextBoxText(string text) _textBox.Text = text; // Move the cursor to the end of the TextBox - _textBox?.Select(_textBox.Text.Length, 0); + if (_textChangeReason == OmnibarTextChangeReason.SuggestionChosen) + _textBox?.Select(_textBox.Text.Length, 0); } private void SubmitQuery(object? item)