Browse Source

Fix caret not displaying when focused via Tab key.

Also set caret position to end when selecting all, as textboxes when selected should scroll to display the end of the text.
pull/4076/head
Steven Kirk 6 years ago
parent
commit
7b1a9fbb84
  1. 10
      src/Avalonia.Controls/TextBox.cs

10
src/Avalonia.Controls/TextBox.cs

@ -347,7 +347,7 @@ namespace Avalonia.Controls
if (IsFocused)
{
DecideCaretVisibility();
_presenter?.ShowCaret();
}
}
@ -364,14 +364,7 @@ namespace Avalonia.Controls
{
SelectAll();
}
else
{
DecideCaretVisibility();
}
}
private void DecideCaretVisibility()
{
_presenter?.ShowCaret();
}
@ -975,6 +968,7 @@ namespace Avalonia.Controls
{
SelectionStart = 0;
SelectionEnd = Text?.Length ?? 0;
CaretIndex = SelectionEnd;
}
private bool DeleteSelection()

Loading…
Cancel
Save