From b0a86ce4a569537bcf467640a6e2f727de968bb2 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 31 Dec 2021 14:40:08 -0600 Subject: [PATCH] fix move cursor to the end when it is not called from main thread --- Flow.Launcher/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index e842f6e8862..6298fdf3d21 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -503,7 +503,7 @@ private void OnKeyDown(object sender, KeyEventArgs e) private void MoveQueryTextToEnd() { - QueryTextBox.CaretIndex = QueryTextBox.Text.Length; + Dispatcher.Invoke(() => QueryTextBox.CaretIndex = QueryTextBox.Text.Length); } public void InitializeColorScheme()