diff --git a/CSharpMath.Editor/Extensions/DisplayEditingExtensions.Radical.cs b/CSharpMath.Editor/Extensions/DisplayEditingExtensions.Radical.cs index 14eba0634..314d87d50 100644 --- a/CSharpMath.Editor/Extensions/DisplayEditingExtensions.Radical.cs +++ b/CSharpMath.Editor/Extensions/DisplayEditingExtensions.Radical.cs @@ -19,19 +19,27 @@ public static MathListIndex IndexForPoint(this RadicalDisplay(this RadicalDisplay self, TypesettingContext context, MathListIndex index) where TFont : IFont { if (index.SubIndexType != MathListSubIndexType.None) throw Arg("The subindex must be none to get the closest point for it.", nameof(index)); - // draw a caret after the radical - return new PointF(self.DisplayBounds.Right, self.Position.Y); + + if (index.AtomIndex == self.Range.End) + // draw a caret after the radical + return new PointF(self.DisplayBounds.Right, self.Position.Y); + + return new PointF(self.DisplayBounds.Left, self.Position.Y); } public static void HighlightCharacterAt(this RadicalDisplay self, MathListIndex index, Color color) where TFont : IFont {