Browse Source
Merge pull request #10381 from Gillibald/fixes/selectableTxtBlockScroll
Fix SelectableTextBlock ScrollViewer selection
pull/10395/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/Avalonia.Controls/SelectableTextBlock.cs
|
|
|
@ -336,7 +336,7 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
point = new Point( |
|
|
|
MathUtilities.Clamp(point.X, 0, Math.Max(TextLayout.Bounds.Width, 0)), |
|
|
|
MathUtilities.Clamp(point.Y, 0, Math.Max(TextLayout.Bounds.Width, 0))); |
|
|
|
MathUtilities.Clamp(point.Y, 0, Math.Max(TextLayout.Bounds.Height, 0))); |
|
|
|
|
|
|
|
var hit = TextLayout.HitTestPoint(point); |
|
|
|
var textPosition = hit.TextPosition; |
|
|
|
|