Browse Source

Fix a copy paste error so mouse movements are properly recognized if the width is smaller than the height.

pull/10381/head
Benedikt Stebner 3 years ago
parent
commit
7cc5e9bbb4
  1. 2
      src/Avalonia.Controls/SelectableTextBlock.cs

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

Loading…
Cancel
Save