mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #1080 from gissehel/caret-position-fix
Caret position fix : Include PR #1074
This commit is contained in:
commit
51a8916cfd
2 changed files with 6 additions and 1 deletions
|
|
@ -538,7 +538,9 @@ namespace Flow.Launcher
|
|||
|
||||
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()
|
||||
|
|
|
|||
|
|
@ -346,6 +346,9 @@ namespace Flow.Launcher.ViewModel
|
|||
{
|
||||
// re-query is done in QueryText's setter method
|
||||
QueryText = queryText;
|
||||
// set to false so the subsequent set true triggers
|
||||
// PropertyChanged and MoveQueryTextToEnd is called
|
||||
QueryTextCursorMovedToEnd = false;
|
||||
}
|
||||
else if (reQuery)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue