-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextBox caret has incorrect position at the end of the string #12809
Comments
@HermanKirshin we had this #12765 merged recently. Maybe you can test latest master (nightly) in order to check if that PR also fixes your issue. Thx 🙏 |
@timunie I had tested latest master and unfortunately no, issue still exists. |
The issue is most likely that we can't draw outside the bounds of the control so we introduced this hack. We could either make the desired size of the TextPresenter slightly bigger or use the adorner layer to draw the caret. |
@Gillibald I guess making it slightly bigger would be the better fix as otherwise one may have the caret sitting on the border |
@Gillibald Thank you, moving this code from GetCaretPoints to MeasureOverride with adding +1 to width solved the problem.
|
Describe the bug
Caret in the end of the string overlaps letter
To Reproduce
Steps to reproduce the behavior:
<LayoutTransformControl> <LayoutTransformControl.LayoutTransform> <ScaleTransform ScaleX="5" ScaleY="5" /> </LayoutTransformControl.LayoutTransform> <TextBox FontFamily="avares://Avalonia.Fonts.Inter/Assets#Inter" FontSize="11.92" /> </LayoutTransformControl>
Expected behavior
Caret offset from letter is always the same
Screenshots
I applied x5 scaling to window for better visibility.
here you can see distance between number and caret
and here they overlap
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: