Browse Source

[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
release/11.1.0-rc1
ijklam 2 years ago
committed by Max Katz
parent
commit
5c3a777430
  1. 2
      src/Avalonia.Controls/TextBox.cs

2
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;

Loading…
Cancel
Save