mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix the caret position : Dispatch the caret move with a lower priority so the QueryTextBox has the new value when the code is executed
This commit is contained in:
parent
444f918914
commit
47ee718f8b
1 changed files with 3 additions and 1 deletions
|
|
@ -538,7 +538,9 @@ namespace Flow.Launcher
|
||||||
|
|
||||||
private void MoveQueryTextToEnd()
|
private void MoveQueryTextToEnd()
|
||||||
{
|
{
|
||||||
Dispatcher.Invoke(() => QueryTextBox.CaretIndex = QueryTextBox.Text.Length);
|
// QueryTextBox seems to be update with a DispatcherPriority as low as ContextIdle.
|
||||||
|
// To ensure QueryTextBox is up to date with QueryText from the View, we need to Dispatch with such a priority
|
||||||
|
Dispatcher.Invoke(() => QueryTextBox.CaretIndex = QueryTextBox.Text.Length, System.Windows.Threading.DispatcherPriority.ContextIdle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InitializeColorScheme()
|
public void InitializeColorScheme()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue