From 5c3a777430a5e1d2ddebdb8ddc1e0c036587eb6d Mon Sep 17 00:00:00 2001 From: ijklam <43789618+Tangent-90@users.noreply.github.com> Date: Mon, 6 May 2024 17:01:44 +0800 Subject: [PATCH] [TextBox] fix double click on TextBox cannot select word on touch device (#15606) * fix double click on TextBox cannot select word on touch device * fix * fix: double click and drag to change selection --- src/Avalonia.Controls/TextBox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs index 1292b332b1..402defea07 100644 --- a/src/Avalonia.Controls/TextBox.cs +++ b/src/Avalonia.Controls/TextBox.cs @@ -1650,7 +1650,7 @@ namespace Avalonia.Controls if (Math.Abs(caretIndex - previousIndex) == 1) e.PreventGestureRecognition(); - if (e.Pointer.Type == PointerType.Mouse) + if (e.Pointer.Type == PointerType.Mouse || _isDoubleTapped) { var selectionStart = SelectionStart; var selectionEnd = SelectionEnd;