From d5f0188ccf9e36d9a3a6207bf4054deadf064f60 Mon Sep 17 00:00:00 2001 From: xLEGiON <57880409+xLEGiON@users.noreply.github.com> Date: Fri, 13 Sep 2024 00:10:52 +0100 Subject: [PATCH] Fix SelectableTextBlock Selection (#15536) Co-authored-by: Benedikt Stebner --- src/Avalonia.Controls/SelectableTextBlock.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Avalonia.Controls/SelectableTextBlock.cs b/src/Avalonia.Controls/SelectableTextBlock.cs index 269f7b23e9..8f1248027c 100644 --- a/src/Avalonia.Controls/SelectableTextBlock.cs +++ b/src/Avalonia.Controls/SelectableTextBlock.cs @@ -347,13 +347,9 @@ namespace Avalonia.Controls } else { - if (_wordSelectionStart == -1 || index < SelectionStart || index > SelectionEnd) - { - SetCurrentValue(SelectionStartProperty, index); - SetCurrentValue(SelectionEndProperty, index); - - _wordSelectionStart = -1; - } + SetCurrentValue(SelectionStartProperty, index); + SetCurrentValue(SelectionEndProperty, index); + _wordSelectionStart = -1; } break;