Skip to content

Commit

Permalink
Merge pull request #10381 from Gillibald/fixes/selectableTxtBlockScroll
Browse files Browse the repository at this point in the history
Fix SelectableTextBlock ScrollViewer selection
  • Loading branch information
maxkatz6 authored Feb 17, 2023
2 parents 5e296ee + 9cf3875 commit c6009b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Avalonia.Controls/SelectableTextBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ protected override void OnPointerMoved(PointerEventArgs e)

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;
Expand Down

0 comments on commit c6009b4

Please sign in to comment.