-
Notifications
You must be signed in to change notification settings - Fork 192
Open
Description
Typing or arrow-navigating to the end of a long overflowing line causes the caret to become invisible (clipped ~2-4px off the right viewport edge).
The BringCaretToView() call (which is also presumably triggered by typing/arrow keys) undershoots at the document end, requiring manually dragging the horizontal scrollbar with the mouse to reveal the caret. This seems like a slight miscalculation, e.g. not accounting for the caret width.
For comparison, the regular Avalonia TextBox never clips the caret - once the end of the line has been reached, the caret stays fixed at the right side of the screen, despite keeping to type.
Minimal reproduction example (try typing a long line in both textboxes to feel the difference):
<Window
x:Class="MainWindow"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ae="using:AvaloniaEdit"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="Example"
Width="400"
MinWidth="360"
Padding="8"
SizeToContent="Height">
<StackPanel Orientation="Vertical">
<ae:TextEditor
x:Name="AvaloniaEditTextBox"
Margin="8"
FontSize="24"/>
<TextBox
x:Name="RegularTextBox"
Margin="8"
FontSize="24" />
</StackPanel>
</Window>Metadata
Metadata
Assignees
Labels
No labels