From a95273902b2f975787f2b7d3d48516d305a31989 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sun, 6 Oct 2019 20:45:17 +0200 Subject: [PATCH] Queue caret update with correct priority. When trying to scroll the caret into view, if we need to wait for a layout first make sure that we queue the update with a lower priority then `Layout`. `Render` is the next lowest priority so use this. Fixes #3070 --- src/Avalonia.Controls/Presenters/TextPresenter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/Presenters/TextPresenter.cs b/src/Avalonia.Controls/Presenters/TextPresenter.cs index debbb81264..5931fec350 100644 --- a/src/Avalonia.Controls/Presenters/TextPresenter.cs +++ b/src/Avalonia.Controls/Presenters/TextPresenter.cs @@ -244,7 +244,7 @@ namespace Avalonia.Controls.Presenters var rect = FormattedText.HitTestTextPosition(caretIndex); this.BringIntoView(rect); }, - DispatcherPriority.Normal); + DispatcherPriority.Render); } } }