From cde90ccbca13dbc996d4e956457f49e2d5be1e42 Mon Sep 17 00:00:00 2001 From: Donzasto Date: Mon, 19 Feb 2024 09:00:24 +0300 Subject: [PATCH] Fix TextBlock wrong caret position (#14627) --- src/Avalonia.Controls/TextBox.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs index 14e2b3e0015..50abfd23c8a 100644 --- a/src/Avalonia.Controls/TextBox.cs +++ b/src/Avalonia.Controls/TextBox.cs @@ -923,6 +923,8 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang } else if (change.Property == SelectionEndProperty) { + _presenter?.MoveCaretToTextPosition(CaretIndex); + OnSelectionEndChanged(change); } else if (change.Property == MaxLinesProperty)